(t *testing.T)
| 2765 | } |
| 2766 | |
| 2767 | func TestAddDuplicateDeclarations(t *testing.T) { |
| 2768 | reg, err := types.NewRegistry(types.ProtoTypeDefs(&proto2pb.TestAllTypes{}, &proto3pb.TestAllTypes{})) |
| 2769 | if err != nil { |
| 2770 | t.Fatalf("types.NewRegistry() failed: %v", err) |
| 2771 | } |
| 2772 | env, err := NewEnv(containers.DefaultContainer, reg, CrossTypeNumericComparisons(true)) |
| 2773 | if err != nil { |
| 2774 | t.Fatalf("NewEnv() failed: %v", err) |
| 2775 | } |
| 2776 | err = env.AddFunctions(stdlib.Functions()...) |
| 2777 | if err != nil { |
| 2778 | t.Fatalf("env.Add() failed: %v", err) |
| 2779 | } |
| 2780 | err = env.AddFunctions(stdlib.Functions()...) |
| 2781 | if err != nil { |
| 2782 | t.Errorf("env.Add() failed with duplicate declarations: %v", err) |
| 2783 | } |
| 2784 | } |
| 2785 | |
| 2786 | func TestAddEquivalentDeclarations(t *testing.T) { |
| 2787 | reg, err := types.NewRegistry(types.ProtoTypeDefs(&proto2pb.TestAllTypes{}, &proto3pb.TestAllTypes{})) |
nothing calls this directly
no test coverage detected