sort members in Read*BinaryClassTest
test should not fail if hash code or hash set is implemented diffently
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
abstract trait test.Foo</*0*/ Q : jet.Any?> : java.lang.Object {
|
|
||||||
}
|
|
||||||
open class test.ClassWithTypePRefNext</*0*/ R : test.Foo<P>?, /*1*/ P : jet.Any?> : java.lang.Object {
|
open class test.ClassWithTypePRefNext</*0*/ R : test.Foo<P>?, /*1*/ P : jet.Any?> : java.lang.Object {
|
||||||
final /*constructor*/ fun </*0*/ R : test.Foo<P>?, /*1*/ P : jet.Any?><init>(): test.ClassWithTypePRefNext<R, P>
|
final /*constructor*/ fun </*0*/ R : test.Foo<P>?, /*1*/ P : jet.Any?><init>(): test.ClassWithTypePRefNext<R, P>
|
||||||
}
|
}
|
||||||
|
abstract trait test.Foo</*0*/ Q : jet.Any?> : java.lang.Object {
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
abstract trait test.Foo : java.lang.Object {
|
|
||||||
}
|
|
||||||
abstract trait test.Bar : java.lang.Object {
|
abstract trait test.Bar : java.lang.Object {
|
||||||
}
|
}
|
||||||
|
abstract trait test.Foo : java.lang.Object {
|
||||||
|
}
|
||||||
open class test.MethodTypePTwoUpperBounds : java.lang.Object {
|
open class test.MethodTypePTwoUpperBounds : java.lang.Object {
|
||||||
final /*constructor*/ fun <init>(): test.MethodTypePTwoUpperBounds
|
final /*constructor*/ fun <init>(): test.MethodTypePTwoUpperBounds
|
||||||
open fun </*0*/ T : test.Bar? & test.Foo?>foo(): jet.Tuple0
|
open fun </*0*/ T : test.Bar? & test.Foo?>foo(): jet.Tuple0
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
|
final annotation class test.Aaa : jet.Any {
|
||||||
|
final /*constructor*/ fun <init>(): test.Aaa
|
||||||
|
}
|
||||||
open class test.HasAnnotatedMethod : java.lang.Object {
|
open class test.HasAnnotatedMethod : java.lang.Object {
|
||||||
final /*constructor*/ fun <init>(): test.HasAnnotatedMethod
|
final /*constructor*/ fun <init>(): test.HasAnnotatedMethod
|
||||||
open test.Aaa() fun f(): jet.Tuple0
|
open test.Aaa() fun f(): jet.Tuple0
|
||||||
}
|
}
|
||||||
final annotation class test.Aaa : jet.Any {
|
|
||||||
final /*constructor*/ fun <init>(): test.Aaa
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
final class test.Inh : test.Base<jet.String> {
|
|
||||||
final /*constructor*/ fun <init>(): test.Inh
|
|
||||||
final override /*1*/ fun foo(): jet.String
|
|
||||||
}
|
|
||||||
open class test.Base</*0,r*/ T : jet.Any?> : jet.Any {
|
open class test.Base</*0,r*/ T : jet.Any?> : jet.Any {
|
||||||
final /*constructor*/ fun </*0,r*/ T : jet.Any?><init>(): test.Base<T>
|
final /*constructor*/ fun </*0,r*/ T : jet.Any?><init>(): test.Base<T>
|
||||||
final fun foo(): T
|
final fun foo(): T
|
||||||
}
|
}
|
||||||
|
final class test.Inh : test.Base<jet.String> {
|
||||||
|
final /*constructor*/ fun <init>(): test.Inh
|
||||||
|
final override /*1*/ fun foo(): jet.String
|
||||||
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
|
abstract trait test.Bbb</*0,r*/ P : jet.Any?> : jet.Any {
|
||||||
|
}
|
||||||
final class test.ClassObjectExtendsTraitWithTP : jet.Any {
|
final class test.ClassObjectExtendsTraitWithTP : jet.Any {
|
||||||
final /*constructor*/ fun <init>(): test.ClassObjectExtendsTraitWithTP
|
final /*constructor*/ fun <init>(): test.ClassObjectExtendsTraitWithTP
|
||||||
final object test.ClassObjectExtendsTraitWithTP.<no name provided> : test.Bbb<jet.String> {
|
final object test.ClassObjectExtendsTraitWithTP.<no name provided> : test.Bbb<jet.String> {
|
||||||
final /*constructor*/ fun <init>(): test.ClassObjectExtendsTraitWithTP.<no name provided>
|
final /*constructor*/ fun <init>(): test.ClassObjectExtendsTraitWithTP.<no name provided>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
abstract trait test.Bbb</*0,r*/ P : jet.Any?> : jet.Any {
|
|
||||||
}
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
abstract trait test.Foo : jet.Any {
|
|
||||||
}
|
|
||||||
abstract trait test.Bar : 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
|
final fun </*0,r*/ T : test.Bar & test.Foo>foo(): jet.Tuple0
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
open class test.Subclass : test.BaseClass {
|
|
||||||
final /*constructor*/ fun <init>(): test.Subclass
|
|
||||||
open val shape: jet.String
|
|
||||||
}
|
|
||||||
open class test.BaseClass : jet.Any {
|
open class test.BaseClass : jet.Any {
|
||||||
final /*constructor*/ fun <init>(): test.BaseClass
|
final /*constructor*/ fun <init>(): test.BaseClass
|
||||||
open val shape: jet.String
|
open val shape: jet.String
|
||||||
}
|
}
|
||||||
|
open class test.Subclass : test.BaseClass {
|
||||||
|
final /*constructor*/ fun <init>(): test.Subclass
|
||||||
|
open val shape: jet.String
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
namespace test
|
namespace test
|
||||||
|
|
||||||
final class test.Subclass : test.BaseClass {
|
|
||||||
final /*constructor*/ fun <init>(): test.Subclass
|
|
||||||
final val exactly: jet.Int
|
|
||||||
}
|
|
||||||
open class test.BaseClass : jet.Any {
|
open class test.BaseClass : jet.Any {
|
||||||
final /*constructor*/ fun <init>(): test.BaseClass
|
final /*constructor*/ fun <init>(): test.BaseClass
|
||||||
final val exactly: jet.Int
|
final val exactly: jet.Int
|
||||||
}
|
}
|
||||||
|
final class test.Subclass : test.BaseClass {
|
||||||
|
final /*constructor*/ fun <init>(): test.Subclass
|
||||||
|
final val exactly: jet.Int
|
||||||
|
}
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ class NamespaceComparator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static <T extends Comparable<T>> List<T> sorted(Collection<T> items) {
|
||||||
|
List<T> r = new ArrayList<T>(items);
|
||||||
|
Collections.sort(r);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
private String doCompareNamespaces(@NotNull NamespaceDescriptor nsa, @NotNull NamespaceDescriptor nsb) {
|
private String doCompareNamespaces(@NotNull NamespaceDescriptor nsa, @NotNull NamespaceDescriptor nsb) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
Assert.assertEquals(nsa.getName(), nsb.getName());
|
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 ca = nsa.getMemberScope().getClassifier(name);
|
||||||
ClassifierDescriptor cb = nsb.getMemberScope().getClassifier(name);
|
ClassifierDescriptor cb = nsb.getMemberScope().getClassifier(name);
|
||||||
Assert.assertTrue(ca != null);
|
Assert.assertTrue(ca != null);
|
||||||
@@ -106,7 +112,7 @@ class NamespaceComparator {
|
|||||||
compareClassifiers(ca, cb, sb);
|
compareClassifiers(ca, cb, sb);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String name : propertyNames) {
|
for (String name : sorted(propertyNames)) {
|
||||||
Set<VariableDescriptor> pa = nsa.getMemberScope().getProperties(name);
|
Set<VariableDescriptor> pa = nsa.getMemberScope().getProperties(name);
|
||||||
Set<VariableDescriptor> pb = nsb.getMemberScope().getProperties(name);
|
Set<VariableDescriptor> pb = nsb.getMemberScope().getProperties(name);
|
||||||
compareDeclarationSets(pa, pb, sb);
|
compareDeclarationSets(pa, pb, sb);
|
||||||
@@ -115,7 +121,7 @@ class NamespaceComparator {
|
|||||||
Assert.assertTrue(nsb.getMemberScope().getFunctions(PropertyCodegen.setterName(name)).isEmpty());
|
Assert.assertTrue(nsb.getMemberScope().getFunctions(PropertyCodegen.setterName(name)).isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String name : functionNames) {
|
for (String name : sorted(functionNames)) {
|
||||||
Set<FunctionDescriptor> fa = nsa.getMemberScope().getFunctions(name);
|
Set<FunctionDescriptor> fa = nsa.getMemberScope().getFunctions(name);
|
||||||
Set<FunctionDescriptor> fb = nsb.getMemberScope().getFunctions(name);
|
Set<FunctionDescriptor> fb = nsb.getMemberScope().getFunctions(name);
|
||||||
compareDeclarationSets(fa, fb, sb);
|
compareDeclarationSets(fa, fb, sb);
|
||||||
|
|||||||
Reference in New Issue
Block a user