修正IDL生成使用枚举对象时,开启debug模式,无法正常打印生成的代码
jhunters opened this issue · 1 comments
jhunters commented
@Test
public void testDefaultValue() {
String idl = "package tutorial;" +
"option java_package = \"com.example.tutorial\";" +
"option java_outer_classname = \"AddressBookProtos\";" +
"enum PhoneType { MOBILE = 0; HOME = 1; WORK = 2;}" +
" message PhoneNumberAA {" +
"optional PhoneType type = 1 [default = HOME]; //abc\n" +
"optional int32 name = 2 [default = 10];" +
"optional string vName = 3 [default = \"hello world\"];" +
"}";
IDLProxyObject idlProxyObject = ProtobufIDLProxy.createSingle(idl, true);
Object type = idlProxyObject.get("type");
Assert.assertEquals(type + "", "HOME");
Assert.assertEquals(10, idlProxyObject.get("name"));
Assert.assertEquals("hello world", idlProxyObject.get("vName"));
}
jhunters commented
2.4.7 已修复该问题