Esempio n. 1
0
func TestExtensionsMyExtendable(t *testing.T) {
	m := NewPopulatedMyExtendable(extr, false)
	err := proto.SetExtension(m, E_FieldA, &fieldA)
	if err != nil {
		panic(err)
	}
	check(t, m, fieldA, E_FieldA)
	proto.SetRawExtension(m, 100, fieldABytes)
	check(t, m, fieldA, E_FieldA)
}
Esempio n. 2
0
func TestExtensionsNoExtensionsMapSetRawExtension(t *testing.T) {
	m := NewPopulatedNoExtensionsMap(extr, false)
	proto.SetRawExtension(m, 100, fieldABytes)
	check(t, m, fieldA, E_FieldA1)
}