@@ -0,0 +1,2215 @@
+/*%0A * Copyright 2019 Volker Berlin (i-net software)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage de.inetsoftware.jwebassembly.runtime;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.zip.CRC32;%0A%0Aimport org.junit.ClassRule;%0Aimport org.junit.runners.Parameterized.Parameters;%0A%0Aimport de.inetsoftware.jwebassembly.ScriptEngine;%0Aimport de.inetsoftware.jwebassembly.WasmRule;%0Aimport de.inetsoftware.jwebassembly.api.annotation.Export;%0A%0A/**%0A * @author Volker Berlin%0A */%0Apublic class Checksums extends AbstractBaseTest %7B%0A    %0A    @ClassRule%0A    public static WasmRule rule = new WasmRule( TestClass.class ); %0A%0A    public Checksums( ScriptEngine script, String method, Object%5B%5D params ) %7B%0A        super( rule, script, method, params );%0A    %7D%0A%0A    @Parameters(name=%22%7B0%7D-%7B1%7D%22)%0A    public static Collection%3CObject%5B%5D%3E data() %7B%0A        ArrayList%3CObject%5B%5D%3E list = new ArrayList%3C%3E();%0A        for( ScriptEngine script : ScriptEngine.testEngines() ) %7B%0A//            addParam( list, script, %22crcUpdate%22 );%0A            addParam( list, script, %22crcUupdateBytes%22 );%0A        %7D%0A        rule.setTestParameters( list );%0A        return list;%0A    %7D%0A%0A    static class TestClass %7B%0A%0A        // TODO%0A//        @Export%0A//        static int crcUpdate() %7B%0A//            CRC32 crc = new CRC32();%0A//            crc.update( 42 );%0A//            return (int)crc.getValue();%0A//        %7D%0A%0A        @Export%0A        static int crcUupdateBytes() %7B%0A            CRC32 crc = new CRC32();%0A            byte%5B%5D a = new byte%5B1000%5D;%0A            for( int i = 0; i %3C a.length; i++ ) %7B%0A                a%5Bi%5D = (byte)i;%0A            %7D%0A            crc.update( a );%0A            return (int)crc.getValue();%0A        %7D%0A    %7D%0A%7D%0A

Add CRC32 support