From 40fdbaffc5726fa686dc1985095b41087710a70d Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Mon, 1 Apr 2019 14:42:15 +0200 Subject: [PATCH] test direct compile again --- .../inetsoftware/jwebassembly/SampleCompileTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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" );