MCPcopy Index your code
hub / github.com/java-native-access/jna / testSetNativeLong

Method testSetNativeLong

test/com/sun/jna/PointerTest.java:55–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54
55 public void testSetNativeLong() {
56 Memory m = new Memory(8);
57 if (NativeLong.SIZE == 4) {
58 final int MAGIC = 0xABEDCF23;
59 m.setNativeLong(0, new NativeLong(MAGIC));
60 assertEquals("Native long mismatch", MAGIC, m.getInt(0));
61 } else {
62 final long MAGIC = 0x1234567887654321L;
63 m.setNativeLong(0, new NativeLong(MAGIC));
64 assertEquals("Native long mismatch", MAGIC, m.getLong(0));
65 }
66 }
67
68 public void testGetSetStringWithDefaultEncoding() throws Exception {
69 final String ENCODING = Native.DEFAULT_ENCODING;

Callers

nothing calls this directly

Calls 3

getIntMethod · 0.95
getLongMethod · 0.95
setNativeLongMethod · 0.80

Tested by

no test coverage detected