(t *testing.T)
| 2723 | } |
| 2724 | |
| 2725 | func TestAddDuplicateDeclarations(t *testing.T) { |
| 2726 | reg, err := types.NewRegistry(types.ProtoTypeDefs(&proto2pb.TestAllTypes{}, &proto3pb.TestAllTypes{})) |
| 2727 | if err != nil { |
| 2728 | t.Fatalf("types.NewRegistry() failed: %v", err) |
| 2729 | } |
| 2730 | env, err := NewEnv(containers.DefaultContainer, reg, CrossTypeNumericComparisons(true)) |
| 2731 | if err != nil { |
| 2732 | t.Fatalf("NewEnv() failed: %v", err) |
| 2733 | } |
| 2734 | err = env.AddFunctions(stdlib.Functions()...) |
| 2735 | if err != nil { |
| 2736 | t.Fatalf("env.Add() failed: %v", err) |
| 2737 | } |
| 2738 | err = env.AddFunctions(stdlib.Functions()...) |
| 2739 | if err != nil { |
| 2740 | t.Errorf("env.Add() failed with duplicate declarations: %v", err) |
| 2741 | } |
| 2742 | } |
| 2743 | |
| 2744 | func TestAddEquivalentDeclarations(t *testing.T) { |
| 2745 | reg, err := types.NewRegistry(types.ProtoTypeDefs(&proto2pb.TestAllTypes{}, &proto3pb.TestAllTypes{})) |
nothing calls this directly
no test coverage detected