jaroslav@611: /** jaroslav@611: * Back 2 Browser Bytecode Translator jaroslav@611: * Copyright (C) 2012 Jaroslav Tulach jaroslav@611: * jaroslav@611: * This program is free software: you can redistribute it and/or modify jaroslav@611: * it under the terms of the GNU General Public License as published by jaroslav@611: * the Free Software Foundation, version 2 of the License. jaroslav@611: * jaroslav@611: * This program is distributed in the hope that it will be useful, jaroslav@611: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@611: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@611: * GNU General Public License for more details. jaroslav@611: * jaroslav@611: * You should have received a copy of the GNU General Public License jaroslav@611: * along with this program. Look for COPYING file in the top folder. jaroslav@611: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@611: */ jaroslav@611: package org.apidesign.bck2brwsr.vmtest.impl; jaroslav@611: jaroslav@611: import java.io.UnsupportedEncodingException; jaroslav@611: import java.util.zip.CRC32; jaroslav@611: import org.apidesign.bck2brwsr.vmtest.Compare; jaroslav@611: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@611: import org.testng.annotations.Factory; jaroslav@611: jaroslav@611: /** jaroslav@611: * jaroslav@611: * @author Jaroslav Tulach jaroslav@611: */ jaroslav@611: public class CRC32Test { jaroslav@611: jaroslav@611: @Compare public long crc1() throws UnsupportedEncodingException { jaroslav@611: CRC32 crc = new CRC32(); jaroslav@611: crc.update("Hello World!".getBytes("UTF-8")); jaroslav@611: return crc.getValue(); jaroslav@611: } jaroslav@611: jaroslav@611: @Factory public static Object[] create() { jaroslav@611: return VMTest.create(CRC32Test.class); jaroslav@611: } jaroslav@611: }