(t *testing.T)
| 305 | } |
| 306 | |
| 307 | func TestFunctions(t *testing.T) { |
| 308 | e, err := NewEnv(OptionalTypes()) |
| 309 | if err != nil { |
| 310 | t.Fatalf("NewEnv() failed: %v", err) |
| 311 | } |
| 312 | for _, expected := range []string{"optional.of", "or"} { |
| 313 | if !e.HasFunction(expected) { |
| 314 | t.Errorf("Expected HasFunction() to return true for '%s'", expected) |
| 315 | } |
| 316 | |
| 317 | if _, ok := e.Functions()[expected]; !ok { |
| 318 | t.Errorf("Expected Functions() to include '%s'", expected) |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | func TestEnvToConfig(t *testing.T) { |
| 324 | tests := []struct { |
nothing calls this directly
no test coverage detected