(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func TestDecodeUsesNativeJSONNumbers(t *testing.T) { |
| 27 | values, err := Decode([]byte(`[[2]]`)) |
| 28 | if err != nil { |
| 29 | t.Fatalf("Decode() error = %v", err) |
| 30 | } |
| 31 | |
| 32 | if value, ok := values[0][0].(float64); !ok || value != 2 { |
| 33 | t.Fatalf("value = %#v", values[0][0]) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func TestParseArgs(t *testing.T) { |
| 38 | values := ParseArgs([]string{"a | b,", "c|d"}) |