MCPcopy Create free account
hub / github.com/cel-expr/cel-go / TestNativeStructWithMultipleSameFieldNames

Function TestNativeStructWithMultipleSameFieldNames

ext/native_test.go:922–930  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

920}
921
922func TestNativeStructWithMultipleSameFieldNames(t *testing.T) {
923 _, err := newNativeType(fieldNameByTag("cel"), reflect.TypeOf(TestStructWithMultipleSameNames{}))
924 if err == nil {
925 t.Fatal("newNativeType() did not fail as expected")
926 }
927 if !errors.Is(err, errDuplicatedFieldName) {
928 t.Fatalf("newNativeType() exepected duplicated field name error, but got: %v", err)
929 }
930}
931
932func TestNativeStructEmbedded(t *testing.T) {
933 var nativeTests = []struct {

Callers

nothing calls this directly

Calls 3

newNativeTypeFunction · 0.85
fieldNameByTagFunction · 0.85
IsMethod · 0.45

Tested by

no test coverage detected