diff --git a/compiler/testData/readJavaBinaryClass/ClassWithTypePRefNext.txt b/compiler/testData/readJavaBinaryClass/ClassWithTypePRefNext.txt
index 7d7ddeff88b..2a9bc6f3e72 100644
--- a/compiler/testData/readJavaBinaryClass/ClassWithTypePRefNext.txt
+++ b/compiler/testData/readJavaBinaryClass/ClassWithTypePRefNext.txt
@@ -1,7 +1,7 @@
namespace test
-abstract trait test.Foo*0*/ Q : jet.Any?> : java.lang.Object {
-}
open class test.ClassWithTypePRefNext*0*/ R : test.Foo
?, /*1*/ P : jet.Any?> : java.lang.Object {
final /*constructor*/ fun *0*/ R : test.Foo
?, /*1*/ P : jet.Any?>(): test.ClassWithTypePRefNext
}
+abstract trait test.Foo*0*/ Q : jet.Any?> : java.lang.Object {
+}
diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt
index 8c4d02d3bcb..2f4ccda8ad5 100644
--- a/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt
+++ b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt
@@ -1,9 +1,9 @@
namespace test
-abstract trait test.Foo : java.lang.Object {
-}
abstract trait test.Bar : java.lang.Object {
}
+abstract trait test.Foo : java.lang.Object {
+}
open class test.MethodTypePTwoUpperBounds : java.lang.Object {
final /*constructor*/ fun (): test.MethodTypePTwoUpperBounds
open fun *0*/ T : test.Bar? & test.Foo?>foo(): jet.Tuple0
diff --git a/compiler/testData/readJavaBinaryClass/annotation/AnnotatedMethod.txt b/compiler/testData/readJavaBinaryClass/annotation/AnnotatedMethod.txt
index 403a84517be..f35f76f1855 100644
--- a/compiler/testData/readJavaBinaryClass/annotation/AnnotatedMethod.txt
+++ b/compiler/testData/readJavaBinaryClass/annotation/AnnotatedMethod.txt
@@ -1,9 +1,9 @@
namespace test
+final annotation class test.Aaa : jet.Any {
+ final /*constructor*/ fun (): test.Aaa
+}
open class test.HasAnnotatedMethod : java.lang.Object {
final /*constructor*/ fun (): test.HasAnnotatedMethod
open test.Aaa() fun f(): jet.Tuple0
}
-final annotation class test.Aaa : jet.Any {
- final /*constructor*/ fun (): test.Aaa
-}
diff --git a/compiler/testData/readKotlinBinaryClass/classFun/FunInParamSuper.txt b/compiler/testData/readKotlinBinaryClass/classFun/FunInParamSuper.txt
index 7fd3b70c31a..5ae2b100411 100644
--- a/compiler/testData/readKotlinBinaryClass/classFun/FunInParamSuper.txt
+++ b/compiler/testData/readKotlinBinaryClass/classFun/FunInParamSuper.txt
@@ -1,10 +1,10 @@
namespace test
-final class test.Inh : test.Base {
- final /*constructor*/ fun (): test.Inh
- final override /*1*/ fun foo(): jet.String
-}
open class test.Base*0,r*/ T : jet.Any?> : jet.Any {
final /*constructor*/ fun *0,r*/ T : jet.Any?>(): test.Base
final fun foo(): T
}
+final class test.Inh : test.Base {
+ final /*constructor*/ fun (): test.Inh
+ final override /*1*/ fun foo(): jet.String
+}
diff --git a/compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTraitWithTP.txt b/compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTraitWithTP.txt
index aaadf2d5e4f..c4a9b1bffd2 100644
--- a/compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTraitWithTP.txt
+++ b/compiler/testData/readKotlinBinaryClass/classObject/ClassObjectExtendsTraitWithTP.txt
@@ -1,10 +1,10 @@
namespace test
+abstract trait test.Bbb*0,r*/ P : jet.Any?> : jet.Any {
+}
final class test.ClassObjectExtendsTraitWithTP : jet.Any {
final /*constructor*/ fun (): test.ClassObjectExtendsTraitWithTP
final object test.ClassObjectExtendsTraitWithTP. : test.Bbb {
final /*constructor*/ fun (): test.ClassObjectExtendsTraitWithTP.
}
}
-abstract trait test.Bbb*0,r*/ P : jet.Any?> : jet.Any {
-}
diff --git a/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt b/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt
index e09763ba27a..fb3fc4697df 100644
--- a/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt
+++ b/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt
@@ -1,7 +1,7 @@
namespace test
-abstract trait test.Foo : jet.Any {
-}
abstract trait test.Bar : jet.Any {
}
+abstract trait test.Foo : jet.Any {
+}
final fun *0,r*/ T : test.Bar & test.Foo>foo(): jet.Tuple0
diff --git a/compiler/testData/readKotlinBinaryClass/prop/OverrideClassVal.txt b/compiler/testData/readKotlinBinaryClass/prop/OverrideClassVal.txt
index 4fbded899c2..6d0324ab1a5 100644
--- a/compiler/testData/readKotlinBinaryClass/prop/OverrideClassVal.txt
+++ b/compiler/testData/readKotlinBinaryClass/prop/OverrideClassVal.txt
@@ -1,10 +1,10 @@
namespace test
-open class test.Subclass : test.BaseClass {
- final /*constructor*/ fun (): test.Subclass
- open val shape: jet.String
-}
open class test.BaseClass : jet.Any {
final /*constructor*/ fun (): test.BaseClass
open val shape: jet.String
}
+open class test.Subclass : test.BaseClass {
+ final /*constructor*/ fun (): test.Subclass
+ open val shape: jet.String
+}
diff --git a/compiler/testData/readKotlinBinaryClass/prop/PropFromSuperclass.txt b/compiler/testData/readKotlinBinaryClass/prop/PropFromSuperclass.txt
index 8f62a7c7c4d..795e64d5724 100644
--- a/compiler/testData/readKotlinBinaryClass/prop/PropFromSuperclass.txt
+++ b/compiler/testData/readKotlinBinaryClass/prop/PropFromSuperclass.txt
@@ -1,10 +1,10 @@
namespace test
-final class test.Subclass : test.BaseClass {
- final /*constructor*/ fun (): test.Subclass
- final val exactly: jet.Int
-}
open class test.BaseClass : jet.Any {
final /*constructor*/ fun (): test.BaseClass
final val exactly: jet.Int
}
+final class test.Subclass : test.BaseClass {
+ final /*constructor*/ fun (): test.Subclass
+ final val exactly: jet.Int
+}
diff --git a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/NamespaceComparator.java b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/NamespaceComparator.java
index 4cacf76cf53..3a03e5b1b7c 100644
--- a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/NamespaceComparator.java
+++ b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/NamespaceComparator.java
@@ -71,6 +71,12 @@ class NamespaceComparator {
}
}
+ private static > List sorted(Collection items) {
+ List r = new ArrayList(items);
+ Collections.sort(r);
+ return r;
+ }
+
private String doCompareNamespaces(@NotNull NamespaceDescriptor nsa, @NotNull NamespaceDescriptor nsb) {
StringBuilder sb = new StringBuilder();
Assert.assertEquals(nsa.getName(), nsb.getName());
@@ -98,7 +104,7 @@ class NamespaceComparator {
}
}
- for (String name : classifierNames) {
+ for (String name : sorted(classifierNames)) {
ClassifierDescriptor ca = nsa.getMemberScope().getClassifier(name);
ClassifierDescriptor cb = nsb.getMemberScope().getClassifier(name);
Assert.assertTrue(ca != null);
@@ -106,7 +112,7 @@ class NamespaceComparator {
compareClassifiers(ca, cb, sb);
}
- for (String name : propertyNames) {
+ for (String name : sorted(propertyNames)) {
Set pa = nsa.getMemberScope().getProperties(name);
Set pb = nsb.getMemberScope().getProperties(name);
compareDeclarationSets(pa, pb, sb);
@@ -115,7 +121,7 @@ class NamespaceComparator {
Assert.assertTrue(nsb.getMemberScope().getFunctions(PropertyCodegen.setterName(name)).isEmpty());
}
- for (String name : functionNames) {
+ for (String name : sorted(functionNames)) {
Set fa = nsa.getMemberScope().getFunctions(name);
Set fb = nsb.getMemberScope().getFunctions(name);
compareDeclarationSets(fa, fb, sb);