test to ensure the generated payload is not larger
This commit is contained in:
parent
f809735ad3
commit
8374c7c97c
2 changed files with 4 additions and 0 deletions
|
@ -124,6 +124,7 @@ public class App {
|
|||
} catch (IOException ex) { }
|
||||
return null;
|
||||
}
|
||||
|
||||
public static byte[] getBytesFromFile(File file) throws IOException {
|
||||
InputStream is = new FileInputStream(file);
|
||||
|
||||
|
|
|
@ -110,8 +110,10 @@ public class TestPathTree {
|
|||
PathTree pt1;
|
||||
List<String> contents0;
|
||||
List<String> contents1;
|
||||
long len0;
|
||||
|
||||
bytes = TestHelpers.loadBytes(this, "test.bin");
|
||||
len0 = bytes.length;
|
||||
pt0 = new PathTree(bytes);
|
||||
contents0 = pt0.toList();
|
||||
for (String str : contents0) {
|
||||
|
@ -126,6 +128,7 @@ public class TestPathTree {
|
|||
assertNotNull(pt1);
|
||||
//printByteArray(pt1.getPayload());
|
||||
contents1 = pt1.toList();
|
||||
assertEquals(len0, pt1.getPayload().length);
|
||||
assertTrue(TestHelpers.cmpStrings(contents0, contents1));
|
||||
for (String str : contents1) {
|
||||
System.out.println(str);
|
||||
|
|
Loading…
Reference in a new issue