yq/yaml_test.go

23 lines
455 B
Go
Raw Normal View History

2015-10-03 07:25:13 +00:00
package main
import (
"testing"
)
var getValueTests = []struct {
argument string
expectedResult interface{}
testDescription string
}{
{"true", true, "boolean"},
{"\"true\"", "true", "boolean as string"},
{"3.4", 3.4, "number"},
{"\"3.4\"", "3.4", "number as string"},
}
func TestGetValue(t *testing.T) {
for _, tt := range getValueTests {
assertResultWithContext(t, tt.expectedResult, getValue(tt.argument), tt.testDescription)
}
}