Fix some of the bytecodeText tests
The changes are necessary because of release coroutines support: - Get rid of suspendCoroutineOrReturn calls. It's anyway irrelevant to what is being tested here - In varValueConflictsWithTable.kt, variables slots have been shifted because the variable for continuation's exception was removed - In varValueConflictsWithTableSameSort.kt, a variable has been introduced to preserve the same slot numbers for old variables. Otherwise, they become shifted and to the second slot, and there are a lot of irrelevant "ALOAD 2" instructions This change is another example of why bytecode text tests are evil
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ abstract class AbstractBytecodeTextTest : CodegenTestCase() {
|
||||
}
|
||||
else {
|
||||
val expected = readExpectedOccurrences(wholeFile.path)
|
||||
val actual = generateToText()
|
||||
val actual = generateToText("helpers/")
|
||||
checkGeneratedTextAgainstExpectedOccurrences(actual, expected)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,10 +480,15 @@ public abstract class CodegenTestCase extends KtUsefulTestCase {
|
||||
|
||||
@NotNull
|
||||
protected String generateToText() {
|
||||
return generateToText(null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected String generateToText(@Nullable String ignorePathPrefix) {
|
||||
if (classFileFactory == null) {
|
||||
classFileFactory = generateFiles(myEnvironment, myFiles);
|
||||
}
|
||||
return classFileFactory.createText();
|
||||
return classFileFactory.createText(ignorePathPrefix);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user