public abstract class AsmTest extends Object
allClassesAndAllApis()
method, selected test methods can be instantiated for each possible (precompiled class, ASM
API) tuple.
For instance, to run a test on all the precompiled classes, with all the APIs, use a subclass such as the following:
public class MyParameterizedTest extends AsmTest { @ParameterizedTest @MethodSource(ALL_CLASSES_AND_ALL_APIS) public void testSomeFeature(PrecompiledClass classParameter, Api apiParameter) { byte[] b = classParameter.getBytes(); ClassWriter classWriter = new ClassWriter(apiParameter.value(), 0); ... } }
Modifier and Type | Class and Description |
---|---|
static class |
AsmTest.Api
An ASM API version.
|
static class |
AsmTest.InvalidClass
An invalid class, hand-crafted to contain some set of invalid class file structures.
|
static class |
AsmTest.PrecompiledClass
A precompiled class, hand-crafted to contain some set of class file structures.
|
Modifier and Type | Field and Description |
---|---|
static String |
ALL_CLASSES_AND_ALL_APIS
MethodSource name to be used in parameterized tests that must be instantiated for all possible
(precompiled class, api) pairs.
|
static String |
ALL_CLASSES_AND_LATEST_API
MethodSource name to be used in parameterized tests that must be instantiated for all
precompiled classes, with the latest api.
|
static String |
UNSUPPORTED_OPERATION_MESSAGE_PATTERN
The expected pattern (i.e.
|
Constructor and Description |
---|
AsmTest() |
Modifier and Type | Method and Description |
---|---|
static Stream<org.junit.jupiter.params.provider.Arguments> |
allClassesAndAllApis()
Builds a list of test arguments for a parameterized test.
|
static Stream<org.junit.jupiter.params.provider.Arguments> |
allClassesAndLatestApi()
Builds a list of test arguments for a parameterized test.
|
public static final String ALL_CLASSES_AND_ALL_APIS
public static final String ALL_CLASSES_AND_LATEST_API
public static final String UNSUPPORTED_OPERATION_MESSAGE_PATTERN
public static Stream<org.junit.jupiter.params.provider.Arguments> allClassesAndAllApis()
@MethodSource("allClassesAndAllApis")
will be executed on all the possible
(precompiledClass, api) pairs.public static Stream<org.junit.jupiter.params.provider.Arguments> allClassesAndLatestApi()
@MethodSource("allClassesAndLatestApi")
will be executed on all the precompiled
classes, with the latest api.Copyright © 2024. All rights reserved.