MCPcopy Create free account
hub / github.com/java-native-access/jna / testDump

Method testDump

test/com/sun/jna/MemoryTest.java:165–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163 }
164
165 public void testDump() {
166 // test with 15 bytes so last line has less than 4 bytes
167 int n = 15;
168
169 Memory m = new Memory(n);
170
171 for (int i = 0; i < n; i++) {
172 m.setByte(i, (byte) i);
173 }
174
175 String ls = System.lineSeparator();
176
177 assertEquals("memory dump" + ls +
178 "[00010203]" + ls +
179 "[04050607]" + ls +
180 "[08090a0b]" + ls +
181 "[0c0d0e]" + ls, m.dump());
182 }
183
184 public void testGetSharedMemory() {
185 Memory mem1 = new Memory(512);

Callers

nothing calls this directly

Calls 2

setByteMethod · 0.95
dumpMethod · 0.95

Tested by

no test coverage detected