mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Added ARM support for UnsafeMemory, https://github.com/OpenHFT/OpenHFT/issues/23
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import net.openhft.chronicle.core.Jvm;
|
||||
import net.openhft.chronicle.core.values.IntValue;
|
||||
import net.openhft.chronicle.values.MaxUtf8Length;
|
||||
import net.openhft.chronicle.values.Values;
|
||||
@@ -29,6 +30,7 @@ import java.util.Map;
|
||||
import static net.openhft.chronicle.values.Values.newNativeReference;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
|
||||
interface DemoOrderVOInterface {
|
||||
public CharSequence getSymbol();
|
||||
@@ -48,6 +50,7 @@ public class DemoChronicleMapTest {
|
||||
|
||||
@Test
|
||||
public void testMap() throws IOException {
|
||||
assumeFalse(Jvm.isArm());
|
||||
File file = File.createTempFile("DummyOrders" + System.currentTimeMillis(), ".test");
|
||||
file.deleteOnExit();
|
||||
int maxEntries = 1000;
|
||||
@@ -56,6 +59,7 @@ public class DemoChronicleMapTest {
|
||||
.putReturnsNull(true)
|
||||
.removeReturnsNull(true)
|
||||
.entries(maxEntries)
|
||||
.entryAndValueOffsetAlignment(8)
|
||||
.createPersistedTo(file)) {
|
||||
IntValue key = Values.newHeapInstance(IntValue.class);
|
||||
|
||||
@@ -90,6 +94,7 @@ public class DemoChronicleMapTest {
|
||||
|
||||
@Test
|
||||
public void testMapLocked() throws IOException {
|
||||
assumeFalse(Jvm.isArm());
|
||||
File file = File.createTempFile("DummyOrders-" + System.currentTimeMillis(), ".test");
|
||||
file.deleteOnExit();
|
||||
int maxEntries = 1000;
|
||||
@@ -98,6 +103,7 @@ public class DemoChronicleMapTest {
|
||||
.putReturnsNull(true)
|
||||
.removeReturnsNull(true)
|
||||
.entries(maxEntries)
|
||||
.entryAndValueOffsetAlignment(8)
|
||||
.createPersistedTo(file)) {
|
||||
IntValue key = Values.newHeapInstance(IntValue.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user