PPrimitive implements PDescriptor { @Override public String toString() { return type.toString(); } private  PPrimitive(PType type, Object defValue, boolean nativePrimitive); @Nonnull PPrimitiveProvider provider(); @Override String getProgramName(); @Nonnull @Override String getName(); @Nonnull @Override String getQualifiedName(String programContext); @Override String toString(); @Nonnull @Override PType getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object getDefaultValue(); boolean isNativePrimitive(); static PPrimitive findByName(String name); static final PPrimitive VOID; static final PPrimitive BOOL; static final PPrimitive BYTE; static final PPrimitive I16; static final PPrimitive I32; static final PPrimitive I64; static final PPrimitive DOUBLE; static final PPrimitive STRING; static final PPrimitive BINARY; }
@Test public void testToString() { assertEquals("bool", PPrimitive.BOOL.toString()); assertEquals("byte", PPrimitive.BYTE.toString()); assertEquals("i16", PPrimitive.I16.toString()); assertEquals("i32", PPrimitive.I32.toString()); assertEquals("i64", PPrimitive.I64.toString()); assertEquals("double", PPrimitive.DOUBLE.toString()); assertEquals("string", PPrimitive.STRING.toString()); assertEquals("binary", PPrimitive.BINARY.toString()); }