Refactor CHECK_BYTECODE_LISTING directive for JVM IR tests

Create a separate _ir.txt bytecode listing file for JVM IR, to avoid
duplicate tests and to fix "Codegent tests on different JDKs"
configuration where this test is muted but passes because only execution
is checked there, not bytecode listing.
This commit is contained in:
Alexander Udalov
2019-11-08 17:35:24 +01:00
parent ce09be3f59
commit de54e549af
13 changed files with 27 additions and 180 deletions
@@ -69,7 +69,8 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
String suffix =
(coroutinesPackage.contains("experimental") || coroutinesPackage.isEmpty())
&& InTextDirectivesUtils.isDirectiveDefined(FileUtil.loadFile(wholeFile), "COMMON_COROUTINES_TEST")
? "_1_2" : "";
? "_1_2" :
getBackend().isIR() ? "_ir" : "";
File expectedFile = new File(wholeFile.getParent(), FilesKt.getNameWithoutExtension(wholeFile) + suffix + ".txt");
String text =