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

Method testGetNativeLong

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

Source from the content-addressed store, hash-verified

38 private static final String UNICODE = "[\u0444]";
39
40 public void testGetNativeLong() {
41 Memory m = new Memory(8);
42 if (NativeLong.SIZE == 4) {
43 final int MAGIC = 0xABEDCF23;
44 m.setInt(0, MAGIC);
45 NativeLong l = m.getNativeLong(0);
46 assertEquals("Native long mismatch", MAGIC, l.intValue());
47 } else {
48 final long MAGIC = 0x1234567887654321L;
49 m.setLong(0, MAGIC);
50 NativeLong l = m.getNativeLong(0);
51 assertEquals("Native long mismatch", MAGIC, l.longValue());
52 }
53 }
54
55 public void testSetNativeLong() {
56 Memory m = new Memory(8);

Callers

nothing calls this directly

Calls 5

setIntMethod · 0.95
setLongMethod · 0.95
getNativeLongMethod · 0.80
intValueMethod · 0.45
longValueMethod · 0.45

Tested by

no test coverage detected