Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
asm
asm
Commits
66c21597
Commit
66c21597
authored
Jan 15, 2022
by
Eric Bruneton
Browse files
Upgrade to Gradle 7.7.3 and to the latest version of the plugins and build tools.
parent
cc65ed51
Pipeline
#18832
failed with stage
in 3 minutes and 45 seconds
Changes
90
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
66c21597
image
:
gradle:
6.7.1
-jdk11
image
:
gradle:
7.3.3
-jdk11
variables
:
# Set the location of the dependency cache to a local directory, so that it
...
...
asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerTest.java
View file @
66c21597
...
...
@@ -48,7 +48,7 @@ import org.objectweb.asm.tree.MethodNode;
*
* @author Eric Bruneton
*/
public
class
AnalyzerTest
extends
AsmTest
{
class
AnalyzerTest
extends
AsmTest
{
private
static
final
String
CLASS_NAME
=
"C"
;
...
...
@@ -75,7 +75,7 @@ public class AnalyzerTest extends AsmTest {
private
final
Label
label12
=
new
Label
();
@Test
public
void
testAnalyze_invalidOpcode
()
{
void
testAnalyze_invalidOpcode
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
insn
(-
1
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -85,7 +85,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidPop
()
{
void
testAnalyze_invalidPop
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
insn
(
Opcodes
.
LCONST_0
).
insn
(
Opcodes
.
POP
).
vreturn
().
build
();
...
...
@@ -96,7 +96,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidPop2
()
{
void
testAnalyze_invalidPop2
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -112,7 +112,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidDup
()
{
void
testAnalyze_invalidDup
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
insn
(
Opcodes
.
LCONST_0
).
insn
(
Opcodes
.
DUP
).
vreturn
().
build
();
...
...
@@ -123,7 +123,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidDupx1
()
{
void
testAnalyze_invalidDupx1
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -139,7 +139,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidDupx2
()
{
void
testAnalyze_invalidDupx2
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -156,7 +156,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidDup2
()
{
void
testAnalyze_invalidDup2
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -172,7 +172,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidDup2x1
()
{
void
testAnalyze_invalidDup2x1
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -189,7 +189,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidDup2x2
()
{
void
testAnalyze_invalidDup2x2
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -207,7 +207,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidSwap
()
{
void
testAnalyze_invalidSwap
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
LCONST_0
)
...
...
@@ -223,7 +223,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidGetLocal
()
{
void
testAnalyze_invalidGetLocal
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
aload
(
10
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -233,7 +233,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidSetLocal
()
{
void
testAnalyze_invalidSetLocal
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
aconst_null
().
astore
(
10
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -243,7 +243,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidPopFromEmptyStack
()
{
void
testAnalyze_invalidPopFromEmptyStack
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
insn
(
Opcodes
.
POP
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -253,7 +253,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidPushOnFullStack
()
{
void
testAnalyze_invalidPushOnFullStack
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
3
,
3
).
iconst_0
().
iconst_0
().
iconst_0
().
iconst_0
().
vreturn
().
build
();
...
...
@@ -264,7 +264,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_inconsistentStackHeights
()
{
void
testAnalyze_inconsistentStackHeights
()
{
Label
ifLabel
=
new
Label
();
MethodNode
methodNode
=
new
MethodNodeBuilder
()
...
...
@@ -282,7 +282,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidRet
()
{
void
testAnalyze_invalidRet
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
ret
(
1
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -292,7 +292,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidFalloffEndOfMethod
()
{
void
testAnalyze_invalidFalloffEndOfMethod
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -302,7 +302,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidFalloffSubroutine
()
{
void
testAnalyze_invalidFalloffSubroutine
()
{
Label
gotoLabel
=
new
Label
();
Label
jsrLabel
=
new
Label
();
MethodNode
methodNode
=
...
...
@@ -323,7 +323,7 @@ public class AnalyzerTest extends AsmTest {
@Disabled
(
"TODO currently Analyzer can not detect this situation"
)
@Test
public
void
testAnalyze_invalidOverlappingSubroutines
()
{
void
testAnalyze_invalidOverlappingSubroutines
()
{
// The problem is that other overlapping subroutine situations are valid, such as
// when a nested subroutine implicitly returns to its parent subroutine, without a RET.
Label
subroutine1Label
=
new
Label
();
...
...
@@ -365,7 +365,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_basicTryFinally
()
throws
AnalyzerException
{
void
testAnalyze_basicTryFinally
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
4
,
4
)
.
iconst_0
()
...
...
@@ -427,7 +427,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_ifElseInFinally
()
throws
AnalyzerException
{
void
testAnalyze_ifElseInFinally
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
5
,
4
)
.
iconst_0
()
...
...
@@ -495,7 +495,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_simpleNestedFinally
()
throws
AnalyzerException
{
void
testAnalyze_simpleNestedFinally
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
5
,
6
)
.
iconst_0
()
...
...
@@ -548,7 +548,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_nestedSubroutines
()
throws
AnalyzerException
{
void
testAnalyze_nestedSubroutines
()
throws
AnalyzerException
{
Label
subroutine1Label
=
new
Label
();
Label
subroutine2Label
=
new
Label
();
MethodNode
methodNode
=
...
...
@@ -597,7 +597,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_subroutineWithNoRet
()
throws
AnalyzerException
{
void
testAnalyze_subroutineWithNoRet
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
1
,
4
)
.
iconst_0
()
...
...
@@ -651,7 +651,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_subroutineWithNoRet2
()
throws
AnalyzerException
{
void
testAnalyze_subroutineWithNoRet2
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
2
,
2
)
.
aconst_null
()
...
...
@@ -674,7 +674,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testAnalyze_subroutineLocalsAccess
()
throws
AnalyzerException
{
void
testAnalyze_subroutineLocalsAccess
()
throws
AnalyzerException
{
Label
startLabel
=
new
Label
();
Label
exceptionHandler1Label
=
new
Label
();
Label
exceptionHandler2Label
=
new
Label
();
...
...
@@ -739,7 +739,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_implicitExit
()
throws
AnalyzerException
{
void
testAnalyze_implicitExit
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
1
,
4
)
.
iconst_0
()
...
...
@@ -811,7 +811,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_implicitExitToAnotherSubroutine
()
throws
AnalyzerException
{
void
testAnalyze_implicitExitToAnotherSubroutine
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
5
,
6
)
.
iconst_0
()
...
...
@@ -872,7 +872,7 @@ public class AnalyzerTest extends AsmTest {
}
@Test
public
void
testanalyze_implicitExitToAnotherSubroutine2
()
throws
AnalyzerException
{
void
testanalyze_implicitExitToAnotherSubroutine2
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
1
,
4
)
.
iconst_0
()
...
...
@@ -909,7 +909,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_interleavedCode
()
throws
AnalyzerException
{
void
testAnalyze_interleavedCode
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
4
,
3
)
.
iconst_0
()
...
...
@@ -977,7 +977,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_implicitExitInTryCatch
()
throws
AnalyzerException
{
void
testAnalyze_implicitExitInTryCatch
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
4
,
6
)
.
iconst_0
()
...
...
@@ -1046,7 +1046,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_manyLabels
()
throws
AnalyzerException
{
void
testAnalyze_manyLabels
()
throws
AnalyzerException
{
Label
target
=
new
Label
();
MethodNodeBuilder
methodNodeBuilder
=
new
MethodNodeBuilder
(
1
,
1
).
jsr
(
target
).
label
(
target
);
for
(
int
i
=
0
;
i
<
8192
;
i
++)
{
...
...
@@ -1070,7 +1070,7 @@ public class AnalyzerTest extends AsmTest {
* @throws AnalyzerException if the test fails
*/
@Test
public
void
testAnalyze_glassFish2CorbaClientDelegateImplExample
()
throws
AnalyzerException
{
void
testAnalyze_glassFish2CorbaClientDelegateImplExample
()
throws
AnalyzerException
{
MethodNode
methodNode
=
new
MethodNodeBuilder
(
3
,
3
)
.
label
(
label0
)
...
...
asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerWithBasicInterpreterTest.java
View file @
66c21597
...
...
@@ -53,18 +53,18 @@ import org.objectweb.asm.tree.MethodNode;
*
* @author Eric Bruneton
*/
public
class
AnalyzerWithBasicInterpreterTest
extends
AsmTest
{
class
AnalyzerWithBasicInterpreterTest
extends
AsmTest
{
private
static
final
String
CLASS_NAME
=
"C"
;
@Test
public
void
testConstructor
()
{
void
testConstructor
()
{
assertDoesNotThrow
(()
->
new
BasicInterpreter
());
assertThrows
(
IllegalStateException
.
class
,
()
->
new
BasicInterpreter
()
{});
}
@Test
public
void
testAnalyze_invalidNewArray
()
{
void
testAnalyze_invalidNewArray
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
iconst_0
().
intInsn
(
Opcodes
.
NEWARRAY
,
-
1
).
vreturn
().
build
();
...
...
@@ -83,8 +83,8 @@ public class AnalyzerWithBasicInterpreterTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource
(
ALL_CLASSES_AND_LATEST_API
)
public
void
testAnalyze_basicInterpreter
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
throws
AnalyzerException
{
void
testAnalyze_basicInterpreter
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
throws
AnalyzerException
{
ClassNode
classNode
=
new
ClassNode
();
new
ClassReader
(
classParameter
.
getBytes
()).
accept
(
classNode
,
0
);
Analyzer
<
BasicValue
>
analyzer
=
...
...
@@ -120,7 +120,7 @@ public class AnalyzerWithBasicInterpreterTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource
(
ALL_CLASSES_AND_LATEST_API
)
public
void
testAnalyzeAndComputeMaxs_basicInterpreter
(
void
testAnalyzeAndComputeMaxs_basicInterpreter
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
throws
AnalyzerException
{
ClassNode
classNode
=
new
ClassNode
();
new
ClassReader
(
classParameter
.
getBytes
()).
accept
(
classNode
,
0
);
...
...
@@ -152,7 +152,7 @@ public class AnalyzerWithBasicInterpreterTest extends AsmTest {
* @throws AnalyzerException if the test class can't be analyzed.
*/
@Test
public
void
testAnalyze_badInterpreter
()
{
void
testAnalyze_badInterpreter
()
{
ClassNode
classNode
=
new
ClassNode
();
new
ClassReader
(
PrecompiledClass
.
JDK8_ALL_FRAMES
.
getBytes
()).
accept
(
classNode
,
0
);
Analyzer
<
BasicValue
>
analyzer
=
...
...
@@ -182,7 +182,7 @@ public class AnalyzerWithBasicInterpreterTest extends AsmTest {
* @throws AnalyzerException if the test class can't be analyzed.
*/
@Test
public
void
testAnalyze_mergeWithJsrReachableFromTwoDifferentPaths
()
void
testAnalyze_mergeWithJsrReachableFromTwoDifferentPaths
()
throws
IOException
,
AnalyzerException
{
ClassReader
classReader
=
new
ClassReader
(
Files
.
newInputStream
(
Paths
.
get
(
"src/test/resources/Issue316204.class"
)));
...
...
asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerWithBasicVerifierTest.java
View file @
66c21597
...
...
@@ -47,18 +47,18 @@ import org.objectweb.asm.tree.MethodNode;
*
* @author Eric Bruneton
*/
public
class
AnalyzerWithBasicVerifierTest
extends
AsmTest
{
class
AnalyzerWithBasicVerifierTest
extends
AsmTest
{
private
static
final
String
CLASS_NAME
=
"C"
;
@Test
public
void
testConstructor
()
{
void
testConstructor
()
{
assertDoesNotThrow
(()
->
new
BasicVerifier
());
assertThrows
(
IllegalStateException
.
class
,
()
->
new
BasicVerifier
()
{});
}
@Test
public
void
testAnalyze_invalidAload
()
{
void
testAnalyze_invalidAload
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
iconst_0
().
istore
(
1
).
aload
(
1
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -68,7 +68,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidAstore
()
{
void
testAnalyze_invalidAstore
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
iconst_0
().
astore
(
1
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -78,7 +78,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidIstore
()
{
void
testAnalyze_invalidIstore
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
aconst_null
().
istore
(
1
).
vreturn
().
build
();
Executable
analyze
=
()
->
newAnalyzer
().
analyze
(
CLASS_NAME
,
methodNode
);
...
...
@@ -88,7 +88,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidCheckcast
()
{
void
testAnalyze_invalidCheckcast
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
iconst_0
()
...
...
@@ -103,7 +103,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidArraylength
()
{
void
testAnalyze_invalidArraylength
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
iconst_0
().
insn
(
Opcodes
.
ARRAYLENGTH
).
vreturn
().
build
();
...
...
@@ -114,7 +114,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidAthrow
()
{
void
testAnalyze_invalidAthrow
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
iconst_0
().
insn
(
Opcodes
.
ATHROW
).
vreturn
().
build
();
...
...
@@ -125,7 +125,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidIneg
()
{
void
testAnalyze_invalidIneg
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
().
insn
(
Opcodes
.
FCONST_0
).
insn
(
Opcodes
.
INEG
).
vreturn
().
build
();
...
...
@@ -136,7 +136,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidIadd
()
{
void
testAnalyze_invalidIadd
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
FCONST_0
)
...
...
@@ -152,7 +152,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidIastore
()
{
void
testAnalyze_invalidIastore
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
ICONST_1
)
...
...
@@ -170,7 +170,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidFastore
()
{
void
testAnalyze_invalidFastore
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
ICONST_1
)
...
...
@@ -188,7 +188,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidLastore
()
{
void
testAnalyze_invalidLastore
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
ICONST_1
)
...
...
@@ -205,7 +205,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidMultianewarray
()
{
void
testAnalyze_invalidMultianewarray
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
FCONST_1
)
...
...
@@ -227,8 +227,7 @@ public class AnalyzerWithBasicVerifierTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource
(
ALL_CLASSES_AND_LATEST_API
)
public
void
testAnalyze_basicVerifier
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
{
void
testAnalyze_basicVerifier
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
{
ClassNode
classNode
=
new
ClassNode
();
new
ClassReader
(
classParameter
.
getBytes
()).
accept
(
classNode
,
0
);
Analyzer
<
BasicValue
>
analyzer
=
newAnalyzer
();
...
...
asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerWithSimpleVerifierTest.java
View file @
66c21597
...
...
@@ -50,12 +50,12 @@ import org.objectweb.asm.tree.MethodNode;
*
* @author Eric Bruneton
*/
public
class
AnalyzerWithSimpleVerifierTest
extends
AsmTest
{
class
AnalyzerWithSimpleVerifierTest
extends
AsmTest
{
private
static
final
String
CLASS_NAME
=
"C"
;
@Test
public
void
testAnalyze_invalidInvokevirtual
()
{
void
testAnalyze_invalidInvokevirtual
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
ACONST_NULL
)
...
...
@@ -73,7 +73,7 @@ public class AnalyzerWithSimpleVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_invalidInvokeinterface
()
{
void
testAnalyze_invalidInvokeinterface
()
{
MethodNode
methodNode
=
new
MethodNodeBuilder
()
.
insn
(
Opcodes
.
ACONST_NULL
)
...
...
@@ -91,7 +91,7 @@ public class AnalyzerWithSimpleVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_classNotFound
()
{
void
testAnalyze_classNotFound
()
{
Label
loopLabel
=
new
Label
();
MethodNode
methodNode
=
new
MethodNodeBuilder
()
...
...
@@ -111,7 +111,7 @@ public class AnalyzerWithSimpleVerifierTest extends AsmTest {
}
@Test
public
void
testAnalyze_mergeStackFrames
()
throws
AnalyzerException
{
void
testAnalyze_mergeStackFrames
()
throws
AnalyzerException
{
Label
loopLabel
=
new
Label
();
MethodNode
methodNode
=
new
MethodNodeBuilder
(
1
,
4
)
...
...
@@ -147,8 +147,7 @@ public class AnalyzerWithSimpleVerifierTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource
(
ALL_CLASSES_AND_LATEST_API
)
public
void
testAnalyze_simpleVerifier
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
{
void
testAnalyze_simpleVerifier
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
{
ClassNode
classNode
=
new
ClassNode
();
new
ClassReader
(
classParameter
.
getBytes
()).
accept
(
classNode
,
0
);
assumeFalse
(
classNode
.
methods
.
isEmpty
());
...
...
@@ -173,7 +172,7 @@ public class AnalyzerWithSimpleVerifierTest extends AsmTest {
* @throws AnalyzerException if the test class can't be analyzed.
*/
@Test
public
void
testIsAssignableFrom_interface
()
throws
AnalyzerException
{
void
testIsAssignableFrom_interface
()
throws
AnalyzerException
{
Label
elseLabel
=
new
Label
();
Label
endIfLabel
=
new
Label
();
MethodNode
methodNode
=
...
...
asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerWithSourceInterpreterTest.java
View file @
66c21597
...
...
@@ -43,10 +43,10 @@ import org.objectweb.asm.tree.MethodNode;
*
* @author Eric Bruneton
*/
public
class
AnalyzerWithSourceInterpreterTest
extends
AsmTest
{
class
AnalyzerWithSourceInterpreterTest
extends
AsmTest
{
@Test
public
void
testConstructor
()
{
void
testConstructor
()
{
assertDoesNotThrow
(()
->
new
SourceInterpreter
());
assertThrows
(
IllegalStateException
.
class
,
()
->
new
SourceInterpreter
()
{});
}
...
...
@@ -58,7 +58,7 @@ public class AnalyzerWithSourceInterpreterTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource
(
ALL_CLASSES_AND_LATEST_API
)
public
void
testAnalyze_sourceInterpreter
(
void
testAnalyze_sourceInterpreter
(
final
PrecompiledClass
classParameter
,
final
Api
apiParameter
)
{
ClassNode
classNode
=
new
ClassNode
();
new
ClassReader
(
classParameter
.
getBytes
()).
accept
(
classNode
,
0
);
...
...
asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicValueTest.java
View file @
66c21597
...
...
@@ -40,10 +40,10 @@ import org.objectweb.asm.Type;
*
* @author Eric Bruneton
*/
public
class
BasicValueTest
{
class
BasicValueTest
{
@Test
public
void
testIsReference
()
{
void
testIsReference
()
{
assertTrue
(
BasicValue
.
REFERENCE_VALUE
.
isReference
());
assertTrue
(
new
BasicValue
(
Type
.
getObjectType
(
"[I"
)).
isReference
());
assertFalse
(
BasicValue
.
UNINITIALIZED_VALUE
.
isReference
());
...
...
@@ -51,7 +51,7 @@ public class BasicValueTest {
}
@Test
public
void
testEquals
()
{
void
testEquals
()
{
boolean
equalsSameUninitializedValue
=
new
BasicValue
(
null
).
equals
(
BasicValue
.
UNINITIALIZED_VALUE
);
boolean
equalsSameValue
=
new
BasicValue
(
Type
.
INT_TYPE
).
equals
(
BasicValue
.
INT_VALUE
);
...
...
@@ -65,13 +65,13 @@ public class BasicValueTest {
}