Skip to content

Commit

Permalink
test direct compile again
Browse files Browse the repository at this point in the history
  • Loading branch information
Horcrux7 committed Apr 1, 2019
1 parent ce93ce5 commit 40fdbaf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/de/inetsoftware/jwebassembly/SampleCompileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ public void compileToText() throws Exception {
assertEquals( expected, text );
}

@Test
public void compileToBinary() throws Exception {
JWebAssembly webAsm = new JWebAssembly();
webAsm.addFile( classFile );
byte[] actual = webAsm.compileToBinary();
byte[] expected = {0, 97, 115, 109, 1, 0, 0, 0};
actual = Arrays.copyOf( actual, 8 );
assertArrayEquals( expected, actual );
}

// @Test
// public void compileToBinary() throws Exception {
// URL url = SampleCompileTest.class.getResource( "samples/" + testName + ".wasm" );
Expand Down

0 comments on commit 40fdbaf

Please sign in to comment.