Lines Matching refs:ktr
41 ktr := &KnownTypeRegistry{}
43 ktr.AddKnownType(dp)
45 checkKnownTypes(t, ktr, wellKnownTypes...)
46 checkKnownTypes(t, ktr, dp)
47 checkUnknownTypes(t, ktr, (*descriptor.FileDescriptorProto)(nil), (*testprotos.TestMessage)(nil))
51 ktr := NewKnownTypeRegistryWithoutWellKnownTypes()
53 ktr.AddKnownType(dp)
55 checkKnownTypes(t, ktr, dp)
56 checkUnknownTypes(t, ktr, wellKnownTypes...)
57 checkUnknownTypes(t, ktr, (*descriptor.FileDescriptorProto)(nil), (*testprotos.TestMessage)(nil))
61 ktr := NewKnownTypeRegistryWithDefaults()
65 checkKnownTypes(t, ktr, dp)
66 …checkKnownTypes(t, ktr, (*descriptor.DescriptorProto)(nil), (*descriptor.FileDescriptorProto)(nil)…
69 func checkKnownTypes(t *testing.T, ktr *KnownTypeRegistry, knownTypes ...proto.Message) {
73 m := ktr.CreateIfKnown(md.GetFullyQualifiedName())
79 func checkUnknownTypes(t *testing.T, ktr *KnownTypeRegistry, unknownTypes ...proto.Message) {
83 m := ktr.CreateIfKnown(md.GetFullyQualifiedName())
103 ktr := NewKnownTypeRegistryWithoutWellKnownTypes()
104 mf := NewMessageFactoryWithKnownTypeRegistry(ktr)