Changed repositories to work with SQLDroid, which seems to have very limited support for blobs, at least it didn't work when I used stream.
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
|
||||
package ch.dissem.bitmessage.utils;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -31,7 +32,7 @@ public class BytesTest {
|
||||
@Test
|
||||
public void ensureExpandsCorrectly() {
|
||||
byte[] source = {1};
|
||||
byte[] expected = {0,1};
|
||||
byte[] expected = {0, 1};
|
||||
assertArrayEquals(expected, Bytes.expand(source, 2));
|
||||
}
|
||||
|
||||
@ -53,6 +54,24 @@ public class BytesTest {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This test is used to compare different implementations of the single byte lt comparison. It an safely be ignored.
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testLowerThanSingleByte() {
|
||||
byte[] a = new byte[1];
|
||||
byte[] b = new byte[1];
|
||||
for (int i = 0; i < 255; i++) {
|
||||
for (int j = 0; j < 255; j++) {
|
||||
System.out.println("a = " + i + "\tb = " + j);
|
||||
a[0] = (byte) i;
|
||||
b[0] = (byte) j;
|
||||
assertEquals(i < j, Bytes.lt(a, b));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLowerThan() {
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
|
Reference in New Issue
Block a user