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