Minor, refactor bytecode text tests on when-over-string optimization
- Merge `duplicatingItemsSameHashCode.kt` and
`duplicatingItemsSameHashCode2.kt` into one test enabled on both
backends, and rename it to
`duplicatingItemsSameHashCodeFewBranches.kt`.
- Rename `duplicatingItemsSameHashCode3.kt` to
`duplicatingItemsSameHashCodeMoreBranches.kt`, and also enable it for
both backends.
- Use JVM_TEMPLATES/JVM_IR_TEMPLATES to check backend-specific behavior:
1) JVM IR does not optimize less than 2 branches by design
2) JVM IR does not generate duplicate branches, also by design
Related to KT-36846.
This commit is contained in:
+6
-11
@@ -4931,19 +4931,14 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItems.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("duplicatingItemsSameHashCode.kt")
|
||||
public void testDuplicatingItemsSameHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCode.kt");
|
||||
@TestMetadata("duplicatingItemsSameHashCodeFewBranches.kt")
|
||||
public void testDuplicatingItemsSameHashCodeFewBranches() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCodeFewBranches.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("duplicatingItemsSameHashCode2.kt")
|
||||
public void testDuplicatingItemsSameHashCode2() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCode2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("duplicatingItemsSameHashCode3.kt")
|
||||
public void testDuplicatingItemsSameHashCode3() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCode3.kt");
|
||||
@TestMetadata("duplicatingItemsSameHashCodeMoreBranches.kt")
|
||||
public void testDuplicatingItemsSameHashCodeMoreBranches() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCodeMoreBranches.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("expression.kt")
|
||||
|
||||
Reference in New Issue
Block a user