(t *testing.T)
| 443 | } |
| 444 | |
| 445 | func TestFunctions(t *testing.T) { |
| 446 | e, err := NewEnv(OptionalTypes()) |
| 447 | if err != nil { |
| 448 | t.Fatalf("NewEnv() failed: %v", err) |
| 449 | } |
| 450 | for _, expected := range []string{"optional.of", "or"} { |
| 451 | if !e.HasFunction(expected) { |
| 452 | t.Errorf("Expected HasFunction() to return true for '%s'", expected) |
| 453 | } |
| 454 | |
| 455 | if _, ok := e.Functions()[expected]; !ok { |
| 456 | t.Errorf("Expected Functions() to include '%s'", expected) |
| 457 | } |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | func TestEnvToConfig(t *testing.T) { |
| 462 | tests := []struct { |
nothing calls this directly
no test coverage detected