mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
* JIT mlrval type-interfence: mlrval package * mlrmap refactor * complete merge from #779 * iterating * mlrval/format.go * mlrval/copy.go * bifs/arithmetic_test.go * iterate on bifs/collections_test.go * mlrval_cmp.go * mlrval JSON iterate * iterate applying mlrval refactors to dependent packages * first clean compile in a long while on this branch * results of first post-compile profiling * testing * bugfix in ofmt formatting * bugfix in octal-supporess * go fmt * neaten * regression tests all passing
18 lines
572 B
Go
18 lines
572 B
Go
package mlrval
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestString(t *testing.T) {
|
|
assert.Equal(t, "234", FromInferredType("234").String())
|
|
assert.Equal(t, "234", FromDeferredType("234").String())
|
|
assert.Equal(t, "234.5", FromInferredType("234.5").String())
|
|
assert.Equal(t, "234.5", FromDeferredType("234.5").String())
|
|
assert.Equal(t, "abc", FromInferredType("abc").String())
|
|
assert.Equal(t, "abc", FromDeferredType("abc").String())
|
|
assert.Equal(t, "", FromInferredType("").String())
|
|
assert.Equal(t, "", FromDeferredType("").String())
|
|
}
|