mirror of
https://github.com/containers/podman.git
synced 2025-05-20 00:27:03 +08:00

This represents the stage3 implementation for the image library. At this point, we are moving the image-centric functions to pkg/image including migration of args and object-oriented references. This is a not a one-for-one migration of funcs and some funcs will need to continue to reside in runtime_img as they are overly specific to libpod and probably not useful to others. Signed-off-by: baude <bbaude@redhat.com> Closes: #484 Approved by: baude
17 lines
389 B
Go
17 lines
389 B
Go
package libpod
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestRemoveScientificNotationFromFloat(t *testing.T) {
|
|
numbers := []float64{0.0, .5, 1.99999932, 1.04e+10}
|
|
results := []float64{0.0, .5, 1.99999932, 1.04}
|
|
for i, x := range numbers {
|
|
result, err := RemoveScientificNotationFromFloat(x)
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, result, results[i])
|
|
}
|
|
}
|