mirror of https://github.com/hyperledger/besu
Bump execution spec tests, reprise (#7056)
* execution-spec-tests generate state and blockchain tests separately Signed-off-by: garyschulte <garyschulte@gmail.com>pull/7058/head
parent
45b6c0895f
commit
5656c5555a
@ -0,0 +1,37 @@ |
|||||||
|
package org.hyperledger.besu.ethereum.vm.executionspec; |
||||||
|
|
||||||
|
import static org.hyperledger.besu.ethereum.vm.GeneralStateReferenceTestTools.executeTest; |
||||||
|
import static org.hyperledger.besu.ethereum.vm.GeneralStateReferenceTestTools.generateTestParametersForConfig; |
||||||
|
import static org.junit.jupiter.api.Assumptions.assumeTrue; |
||||||
|
|
||||||
|
import org.hyperledger.besu.ethereum.referencetests.GeneralStateTestCaseEipSpec; |
||||||
|
|
||||||
|
import java.util.stream.Stream; |
||||||
|
|
||||||
|
import org.junit.jupiter.params.ParameterizedTest; |
||||||
|
import org.junit.jupiter.params.provider.Arguments; |
||||||
|
import org.junit.jupiter.params.provider.MethodSource; |
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assumptions.assumeTrue; |
||||||
|
|
||||||
|
/** The general state test operation testing framework entry point. */ |
||||||
|
public class %%TESTS_NAME%% { |
||||||
|
|
||||||
|
private static final String[] TEST_CONFIG_FILE_DIR_PATH = new String[] {%%TESTS_FILE%%}; |
||||||
|
|
||||||
|
public static Stream<Arguments> getTestParametersForConfig() { |
||||||
|
return generateTestParametersForConfig(TEST_CONFIG_FILE_DIR_PATH).stream().map(params -> |
||||||
|
Arguments.of(params[0], params[1], params[2]) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
@ParameterizedTest(name = "Name: {0}") |
||||||
|
@MethodSource("getTestParametersForConfig") |
||||||
|
public void execution( |
||||||
|
final String name, |
||||||
|
final GeneralStateTestCaseEipSpec spec, |
||||||
|
final boolean runTest) { |
||||||
|
assumeTrue(runTest, "Test " + name + " was ignored"); |
||||||
|
executeTest(spec); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
package org.hyperledger.besu.ethereum.vm.executionspec; |
||||||
|
|
||||||
|
import static org.hyperledger.besu.ethereum.vm.BlockchainReferenceTestTools.executeTest; |
||||||
|
import static org.hyperledger.besu.ethereum.vm.BlockchainReferenceTestTools.generateTestParametersForConfig; |
||||||
|
|
||||||
|
import org.hyperledger.besu.ethereum.referencetests.BlockchainReferenceTestCaseSpec; |
||||||
|
|
||||||
|
import java.util.stream.Stream; |
||||||
|
|
||||||
|
import org.junit.jupiter.params.ParameterizedTest; |
||||||
|
import org.junit.jupiter.params.provider.Arguments; |
||||||
|
import org.junit.jupiter.params.provider.MethodSource; |
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assumptions.assumeTrue; |
||||||
|
|
||||||
|
/** The blockchain test operation testing framework entry point. */ |
||||||
|
public class %%TESTS_NAME%% { |
||||||
|
|
||||||
|
private static final String[] TEST_CONFIG_FILE_DIR_PATH = new String[] {%%TESTS_FILE%%}; |
||||||
|
|
||||||
|
public static Stream<Arguments> getTestParametersForConfig() { |
||||||
|
return generateTestParametersForConfig(TEST_CONFIG_FILE_DIR_PATH).stream().map(params -> |
||||||
|
Arguments.of(params[0], params[1], params[2]) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
@ParameterizedTest(name = "Name: {0}") |
||||||
|
@MethodSource("getTestParametersForConfig") |
||||||
|
public void execution( |
||||||
|
final String name, |
||||||
|
final BlockchainReferenceTestCaseSpec spec, |
||||||
|
final boolean runTest) { |
||||||
|
assumeTrue(runTest, "Test " + name + " was ignored"); |
||||||
|
executeTest(spec); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue