// but JNA seems to interpret it properly
assertEquals(null, converter.toNative(null, null));
}
@Test public void convertsReturnedIDToString() {
ID helloID = Foundation.cfString("Hello"); // just leaks
// We can cope with 64 bits on 64 and 32
Number nativeValue = new Long(helloID.longValue());
String converted = converter.fromNative(nativeValue, null);
assertEquals("Hello", converted);
// We must cope with 32 bits on 32-bit
if (NativeLong.SIZE == 4) {
nativeValue = new Integer(helloID.intValue());
converted = converter.fromNative(nativeValue, null);
assertEquals("Hello", converted);
}
}