mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
reorder the script engines for testing
This commit is contained in:
parent
8cd9d16a33
commit
fd0a22121c
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.inetsoftware.jwebassembly;
|
package de.inetsoftware.jwebassembly;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,15 +29,23 @@ public enum ScriptEngine {
|
|||||||
Wat2Wasm,
|
Wat2Wasm,
|
||||||
;
|
;
|
||||||
|
|
||||||
public static Collection<ScriptEngine[]> testParams() {
|
public static ScriptEngine[] testEngines() {
|
||||||
ScriptEngine[][] val = { //
|
ScriptEngine[] val = { //
|
||||||
{ ScriptEngine.SpiderMonkey }, //
|
SpiderMonkey, //
|
||||||
{ ScriptEngine.NodeJS }, //
|
NodeJS, //
|
||||||
{ ScriptEngine.NodeWat }, //
|
NodeWat, //
|
||||||
{ ScriptEngine.SpiderMonkeyWat },//
|
SpiderMonkeyWat,//
|
||||||
{ ScriptEngine.Wat2Wasm }, //
|
Wat2Wasm, //
|
||||||
};
|
};
|
||||||
return Arrays.asList(val);
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Collection<ScriptEngine[]> testParams() {
|
||||||
|
ArrayList<ScriptEngine[]> val = new ArrayList<>();
|
||||||
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
|
val.add( new ScriptEngine[] { script } );
|
||||||
|
}
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +40,7 @@ public class Arrays extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "length" );
|
addParam( list, script, "length" );
|
||||||
addParam( list, script, "loopByte" );
|
addParam( list, script, "loopByte" );
|
||||||
addParam( list, script, "loopShort" );
|
addParam( list, script, "loopShort" );
|
||||||
|
@ -42,8 +42,7 @@ public class CallFunctions extends AbstractBaseTest {
|
|||||||
@Parameters(name="{0}-{1}")
|
@Parameters(name="{0}-{1}")
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "intCall" );
|
addParam( list, script, "intCall" );
|
||||||
addParam( list, script, "nativeCall" );
|
addParam( list, script, "nativeCall" );
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,7 @@ public class ControlFlowOperators extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "ifeq" );
|
addParam( list, script, "ifeq" );
|
||||||
addParam( list, script, "ifne" );
|
addParam( list, script, "ifne" );
|
||||||
addParam( list, script, "iflt" );
|
addParam( list, script, "iflt" );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 Volker Berlin (i-net software)
|
* Copyright 2018 - 2019 Volker Berlin (i-net software)
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -39,8 +39,7 @@ public class Exceptions extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "simple" );
|
addParam( list, script, "simple" );
|
||||||
addParam( list, script, "direct" );
|
addParam( list, script, "direct" );
|
||||||
addParam( list, script, "rethrow" );
|
addParam( list, script, "rethrow" );
|
||||||
|
@ -40,8 +40,7 @@ public class MathAPI extends AbstractBaseTest {
|
|||||||
@Parameters(name="{0}-{1}")
|
@Parameters(name="{0}-{1}")
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "floatToIntBits" );
|
addParam( list, script, "floatToIntBits" );
|
||||||
addParam( list, script, "intBitsToFloat" );
|
addParam( list, script, "intBitsToFloat" );
|
||||||
addParam( list, script, "doubleToLongBits" );
|
addParam( list, script, "doubleToLongBits" );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017 - 2018 Volker Berlin (i-net software)
|
* Copyright 2017 - 2019 Volker Berlin (i-net software)
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -40,8 +40,7 @@ public class MathOperations extends AbstractBaseTest {
|
|||||||
@Parameters(name="{0}-{1}")
|
@Parameters(name="{0}-{1}")
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "intConst" );
|
addParam( list, script, "intConst" );
|
||||||
addParam( list, script, "floatConst" );
|
addParam( list, script, "floatConst" );
|
||||||
addParam( list, script, "doubleConst" );
|
addParam( list, script, "doubleConst" );
|
||||||
|
@ -37,8 +37,7 @@ public class Stacks extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "dupInt" );
|
addParam( list, script, "dupInt" );
|
||||||
addParam( list, script, "dupFloat" );
|
addParam( list, script, "dupFloat" );
|
||||||
addParam( list, script, "dupDouble" );
|
addParam( list, script, "dupDouble" );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 Volker Berlin (i-net software)
|
* Copyright 2018 - 2019 Volker Berlin (i-net software)
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -37,8 +37,7 @@ public class StaticValues extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "abc" );
|
addParam( list, script, "abc" );
|
||||||
}
|
}
|
||||||
rule.setTestParameters( list );
|
rule.setTestParameters( list );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 Volker Berlin (i-net software)
|
* Copyright 2018 - 2019 Volker Berlin (i-net software)
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -40,8 +40,7 @@ public class Structs extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "isNull" );
|
addParam( list, script, "isNull" );
|
||||||
addParam( list, script, "isNotNull" );
|
addParam( list, script, "isNotNull" );
|
||||||
addParam( list, script, "isSame" );
|
addParam( list, script, "isSame" );
|
||||||
|
@ -37,8 +37,7 @@ public class Wide extends AbstractBaseTest {
|
|||||||
@Parameters( name = "{0}-{1}" )
|
@Parameters( name = "{0}-{1}" )
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
ArrayList<Object[]> list = new ArrayList<>();
|
ArrayList<Object[]> list = new ArrayList<>();
|
||||||
for( ScriptEngine[] val : ScriptEngine.testParams() ) {
|
for( ScriptEngine script : ScriptEngine.testEngines() ) {
|
||||||
ScriptEngine script = val[0];
|
|
||||||
addParam( list, script, "thenBranch" );
|
addParam( list, script, "thenBranch" );
|
||||||
addParam( list, script, "elseBranch" );
|
addParam( list, script, "elseBranch" );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user