PPrimitive implements PDescriptor { @Override public boolean equals(Object o) { return this == o; } 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 testEquals() { assertEquals(PPrimitive.BOOL, PPrimitive.BOOL.provider() .descriptor()); assertEquals(PPrimitive.BYTE, PPrimitive.BYTE.provider() .descriptor()); assertEquals(PPrimitive.I16, PPrimitive.I16.provider() .descriptor()); assertEquals(PPrimitive.I32, PPrimitive.I32.provider() .descriptor()); assertEquals(PPrimitive.I64, PPrimitive.I64.provider() .descriptor()); assertEquals(PPrimitive.DOUBLE, PPrimitive.DOUBLE.provider() .descriptor()); assertEquals(PPrimitive.STRING, PPrimitive.STRING.provider() .descriptor()); assertEquals(PPrimitive.BINARY, PPrimitive.BINARY.provider() .descriptor()); }