()
| 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; |