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

Method testInvalidAlignment

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

Source from the content-addressed store, hash-verified

114 }
115
116 public void testInvalidAlignment() {
117 final int SIZE = 128;
118 Memory base = new Memory(SIZE);
119 int[] alignments = { 0, 3, 5, 9, 13 };
120 for (int i=0;i < alignments.length;i++) {
121 try {
122 base.align(alignments[i]);
123 fail("Power-of-two alignments required");
124 }
125 catch(IllegalArgumentException e) { }
126 }
127 }
128
129 public void testAvoidGCWithExtantBuffer() throws Exception {
130 if (!Platform.HAS_BUFFERS) return;

Callers

nothing calls this directly

Calls 1

alignMethod · 0.95

Tested by

no test coverage detected