Add test on bytecode text
Test data should be a Kotlin source file with zero or more comments e.g. of the form: '// 1 INVOKEVIRTUAL'. The test then checks that the generated bytecode for this file contains exactly one occurrence of the string 'INVOKEVIRTUAL'
This commit is contained in:
@@ -20,6 +20,7 @@ import junit.framework.TestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.checkers.AbstractDiagnosticsTestWithEagerResolve;
|
||||
import org.jetbrains.jet.checkers.AbstractJetPsiCheckerTest;
|
||||
import org.jetbrains.jet.codegen.AbstractBytecodeTextTest;
|
||||
import org.jetbrains.jet.codegen.AbstractCheckLocalVariablesTableTest;
|
||||
import org.jetbrains.jet.codegen.defaultConstructor.AbstractDefaultConstructorCodegenTest;
|
||||
import org.jetbrains.jet.codegen.flags.AbstractWriteFlagsTest;
|
||||
@@ -96,6 +97,13 @@ public class GenerateTests {
|
||||
testModel("compiler/testData/codegen/boxWithStdlib", "doTestWithStdlib")
|
||||
);
|
||||
|
||||
generateTest(
|
||||
"compiler/tests/",
|
||||
"BytecodeTextTestGenerated",
|
||||
AbstractBytecodeTextTest.class,
|
||||
testModel("compiler/testData/codegen/bytecodeText")
|
||||
);
|
||||
|
||||
generateTest(
|
||||
"compiler/tests/",
|
||||
"CheckLocalVariablesTableTestGenerated",
|
||||
|
||||
Reference in New Issue
Block a user