◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
36 changes: 33 additions & 3 deletions src/test/java/org/lmdbjava/ComparatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static org.lmdbjava.DirectBufferProxy.PROXY_DB;

import java.nio.ByteBuffer;
import java.util.Comparator;

import com.google.common.primitives.SignedBytes;
Expand Down Expand Up @@ -156,9 +157,38 @@ private static class ByteBufferRunner implements ComparatorRunner {

@Override
public int compare(final byte[] o1, final byte[] o2) {
final ByteBuffer o1b = ByteBuffer.wrap(o1);
final ByteBuffer o2b = ByteBuffer.wrap(o2);
return PROXY_OPTIMAL.compare(o1b, o2b);
}
}

Expand Down
Toggle all file notes Toggle all file annotations