mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Add test for update a single byte
This commit is contained in:
parent
19a119d7f4
commit
023ea867a1
@ -42,8 +42,8 @@ public class Checksums extends AbstractBaseTest {
|
|||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
// addParam( list, script, "crcUpdate" );
|
addParam( list, script, "crcUpdate" );
|
||||||
addParam( list, script, "crcUupdateBytes" );
|
addParam( list, script, "crcUpdateBytes" );
|
||||||
}
|
}
|
||||||
rule.setTestParameters( list );
|
rule.setTestParameters( list );
|
||||||
return list;
|
return list;
|
||||||
@ -51,16 +51,15 @@ public class Checksums extends AbstractBaseTest {
|
|||||||
|
|
||||||
static class TestClass {
|
static class TestClass {
|
||||||
|
|
||||||
// TODO
|
@Export
|
||||||
// @Export
|
static int crcUpdate() {
|
||||||
// static int crcUpdate() {
|
CRC32 crc = new CRC32();
|
||||||
// CRC32 crc = new CRC32();
|
crc.update( 42 );
|
||||||
// crc.update( 42 );
|
return (int)crc.getValue();
|
||||||
// return (int)crc.getValue();
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
@Export
|
@Export
|
||||||
static int crcUupdateBytes() {
|
static int crcUpdateBytes() {
|
||||||
CRC32 crc = new CRC32();
|
CRC32 crc = new CRC32();
|
||||||
byte[] a = new byte[1000];
|
byte[] a = new byte[1000];
|
||||||
for( int i = 0; i < a.length; i++ ) {
|
for( int i = 0; i < a.length; i++ ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user