diff --git a/test/de/inetsoftware/jwebassembly/SampleCompileTest.java b/test/de/inetsoftware/jwebassembly/SampleCompileTest.java index cad37c0c..6760f350 100644 --- a/test/de/inetsoftware/jwebassembly/SampleCompileTest.java +++ b/test/de/inetsoftware/jwebassembly/SampleCompileTest.java @@ -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" );