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:
@@ -185,9 +185,16 @@ public class ClassFileFactory implements OutputFileCollection {
|
||||
@NotNull
|
||||
@TestOnly
|
||||
public String createText() {
|
||||
return createText(null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@TestOnly
|
||||
public String createText(@Nullable String ignorePrefixPath) {
|
||||
StringBuilder answer = new StringBuilder();
|
||||
|
||||
for (OutputFile file : asList()) {
|
||||
if (ignorePrefixPath != null && file.getRelativePath().startsWith(ignorePrefixPath)) continue;
|
||||
File relativePath = new File(file.getRelativePath());
|
||||
answer.append("@").append(relativePath).append('\n');
|
||||
switch (FilesKt.getExtension(relativePath)) {
|
||||
|
||||
Reference in New Issue
Block a user