Attaching stdlib in load java tests more directly.

This commit is contained in:
Evgeny Gerashchenko
2013-06-20 20:26:44 +04:00
parent 63dbfcb81c
commit c77559fac9
10 changed files with 15 additions and 16 deletions
@@ -1,7 +1,7 @@
package test package test
public /*synthesized*/ fun SubstitutedSamInterface(/*0*/ function: (jet.String?, jet.String?) -> jet.Int): test.SubstitutedSamInterface public /*synthesized*/ fun SubstitutedSamInterface(/*0*/ function: (jet.String, jet.String) -> jet.Int): test.SubstitutedSamInterface
public trait SubstitutedSamInterface : java.util.Comparator<jet.String> { public trait SubstitutedSamInterface : java.util.Comparator<jet.String> {
public abstract override /*1*/ /*fake_override*/ fun compare(/*0*/ p0: jet.String?, /*1*/ p1: jet.String?): jet.Int public abstract override /*1*/ /*fake_override*/ fun compare(/*0*/ p0: jet.String, /*1*/ p1: jet.String): jet.Int
} }
@@ -2,8 +2,8 @@ package test
public open class NonTrivialFunctionType : java.lang.Object { public open class NonTrivialFunctionType : java.lang.Object {
public constructor NonTrivialFunctionType() public constructor NonTrivialFunctionType()
public open /*synthesized*/ fun foo(/*0*/ p0: ((java.io.File?, jet.String?) -> jet.Boolean)?): jet.Unit public open /*synthesized*/ fun foo(/*0*/ p0: ((java.io.File, jet.String) -> jet.Boolean)?): jet.Unit
public open /*synthesized*/ fun foo(/*0*/ p0: ((jet.String?, jet.String?) -> jet.Int)?): jet.Unit public open /*synthesized*/ fun foo(/*0*/ p0: ((jet.String, jet.String) -> jet.Int)?): jet.Unit
public open fun foo(/*0*/ p0: java.io.FilenameFilter?): jet.Unit public open fun foo(/*0*/ p0: java.io.FilenameFilter?): jet.Unit
public open fun foo(/*0*/ p0: java.util.Comparator<jet.String>?): jet.Unit public open fun foo(/*0*/ p0: java.util.Comparator<jet.String>?): jet.Unit
public open /*synthesized*/ fun wildcardBound(/*0*/ p0: ((jet.CharSequence?, jet.CharSequence?) -> jet.Int)?): jet.Unit public open /*synthesized*/ fun wildcardBound(/*0*/ p0: ((jet.CharSequence?, jet.CharSequence?) -> jet.Int)?): jet.Unit
@@ -5,6 +5,6 @@ public open class SeveralSamParameters : java.lang.Object {
} }
package SeveralSamParameters { package SeveralSamParameters {
public open /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((jet.String?, jet.String?) -> jet.Int)?, /*1*/ p1: jet.String?, /*2*/ p2: jet.String?, /*3*/ p3: (() -> jet.Unit)?): jet.String? public open /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((jet.String, jet.String) -> jet.Int)?, /*1*/ p1: jet.String?, /*2*/ p2: jet.String?, /*3*/ p3: (() -> jet.Unit)?): jet.String?
public open fun findMaxAndInvokeCallback(/*0*/ p0: java.util.Comparator<jet.String>?, /*1*/ p1: jet.String?, /*2*/ p2: jet.String?, /*3*/ p3: java.lang.Runnable?): jet.String? public open fun findMaxAndInvokeCallback(/*0*/ p0: java.util.Comparator<jet.String>?, /*1*/ p1: jet.String?, /*2*/ p2: jet.String?, /*3*/ p3: java.lang.Runnable?): jet.String?
} }
@@ -2,6 +2,6 @@ package test
public open class TypeParameterOfClass</*0*/ T> : java.lang.Object { public open class TypeParameterOfClass</*0*/ T> : java.lang.Object {
public constructor TypeParameterOfClass</*0*/ T>() public constructor TypeParameterOfClass</*0*/ T>()
public open /*synthesized*/ fun foo(/*0*/ p0: ((T?, T?) -> jet.Int)?): jet.Unit public open /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> jet.Int)?): jet.Unit
public open fun foo(/*0*/ p0: java.util.Comparator<T>?): jet.Unit public open fun foo(/*0*/ p0: java.util.Comparator<T>?): jet.Unit
} }
@@ -5,10 +5,10 @@ public open class TypeParameterOfMethod : java.lang.Object {
} }
package TypeParameterOfMethod { package TypeParameterOfMethod {
public open /*synthesized*/ fun </*0*/ T> max(/*0*/ p0: ((T?, T?) -> jet.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T? public open /*synthesized*/ fun </*0*/ T> max(/*0*/ p0: ((T, T) -> jet.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public open fun </*0*/ T> max(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T? public open fun </*0*/ T> max(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public open /*synthesized*/ fun </*0*/ T : jet.CharSequence?> max2(/*0*/ p0: ((T?, T?) -> jet.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T? public open /*synthesized*/ fun </*0*/ T : jet.CharSequence?> max2(/*0*/ p0: ((T, T) -> jet.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public open fun </*0*/ T : jet.CharSequence?> max2(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T? public open fun </*0*/ T : jet.CharSequence?> max2(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public open /*synthesized*/ fun </*0*/ A : jet.CharSequence?, /*1*/ B : jet.List<A>?> method(/*0*/ p0: ((A?, A?) -> jet.Int)?, /*1*/ p1: B?): jet.Unit public open /*synthesized*/ fun </*0*/ A : jet.CharSequence?, /*1*/ B : jet.List<A>?> method(/*0*/ p0: ((A, A) -> jet.Int)?, /*1*/ p1: B?): jet.Unit
public open fun </*0*/ A : jet.CharSequence?, /*1*/ B : jet.List<A>?> method(/*0*/ p0: java.util.Comparator<A>?, /*1*/ p1: B?): jet.Unit public open fun </*0*/ A : jet.CharSequence?, /*1*/ B : jet.List<A>?> method(/*0*/ p0: java.util.Comparator<A>?, /*1*/ p1: B?): jet.Unit
} }
@@ -5,7 +5,7 @@ public open class TypeParameterOfOuterClass</*0*/ T> : java.lang.Object {
public open inner class Inner : java.lang.Object { public open inner class Inner : java.lang.Object {
public constructor Inner() public constructor Inner()
public open /*synthesized*/ fun foo(/*0*/ p0: ((T?, T?) -> jet.Int)?): jet.Unit public open /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> jet.Int)?): jet.Unit
public open fun foo(/*0*/ p0: java.util.Comparator<T>?): jet.Unit public open fun foo(/*0*/ p0: java.util.Comparator<T>?): jet.Unit
} }
} }
@@ -2,10 +2,10 @@ package test
public final class ClassWithObjectMethod : java.lang.Object { public final class ClassWithObjectMethod : java.lang.Object {
public constructor ClassWithObjectMethod() public constructor ClassWithObjectMethod()
protected open override /*1*/ /*fake_override*/ fun clone(): jet.Any? protected open override /*1*/ /*fake_override*/ fun clone(): jet.Any
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ p0: jet.Any?): jet.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ p0: jet.Any?): jet.Boolean
protected open override /*1*/ /*fake_override*/ fun finalize(): jet.Unit protected open override /*1*/ /*fake_override*/ fun finalize(): jet.Unit
public final override /*1*/ /*fake_override*/ fun getClass(): java.lang.Class<out jet.Any?>? public final override /*1*/ /*fake_override*/ fun getClass(): java.lang.Class<out jet.Any?>
public open override /*1*/ /*fake_override*/ fun hashCode(): jet.Int public open override /*1*/ /*fake_override*/ fun hashCode(): jet.Int
public final override /*1*/ /*fake_override*/ fun notify(): jet.Unit public final override /*1*/ /*fake_override*/ fun notify(): jet.Unit
public final override /*1*/ /*fake_override*/ fun notifyAll(): jet.Unit public final override /*1*/ /*fake_override*/ fun notifyAll(): jet.Unit
@@ -4,7 +4,7 @@ public trait InterfaceWithObjectMethods : java.lang.Object {
public abstract override /*1*/ fun clone(): jet.Any? public abstract override /*1*/ fun clone(): jet.Any?
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ p0: jet.Any?): jet.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ p0: jet.Any?): jet.Boolean
public abstract override /*1*/ fun finalize(): jet.Unit public abstract override /*1*/ fun finalize(): jet.Unit
public final override /*1*/ /*fake_override*/ fun getClass(): java.lang.Class<out jet.Any?>? public final override /*1*/ /*fake_override*/ fun getClass(): java.lang.Class<out jet.Any?>
public open override /*1*/ /*fake_override*/ fun hashCode(): jet.Int public open override /*1*/ /*fake_override*/ fun hashCode(): jet.Int
public final override /*1*/ /*fake_override*/ fun notify(): jet.Unit public final override /*1*/ /*fake_override*/ fun notify(): jet.Unit
public final override /*1*/ /*fake_override*/ fun notifyAll(): jet.Unit public final override /*1*/ /*fake_override*/ fun notifyAll(): jet.Unit
@@ -67,7 +67,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
File txtFile = getTxtFile(javaFile.getPath()); File txtFile = getTxtFile(javaFile.getPath());
NamespaceDescriptor kotlinNamespace = analyzeKotlinAndLoadTestNamespace(ktFile, myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS); NamespaceDescriptor kotlinNamespace = analyzeKotlinAndLoadTestNamespace(ktFile, myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS);
Pair<NamespaceDescriptor, BindingContext> javaNamespaceAndContext = compileJavaAndLoadTestNamespaceAndBindingContextFromBinary( Pair<NamespaceDescriptor, BindingContext> javaNamespaceAndContext = compileJavaAndLoadTestNamespaceAndBindingContextFromBinary(
Arrays.asList(javaFile), tmpdir, myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS); Arrays.asList(javaFile), tmpdir, myTestRootDisposable, ConfigurationKind.ALL);
checkLoadedNamespaces(txtFile, kotlinNamespace, javaNamespaceAndContext.first, javaNamespaceAndContext.second); checkLoadedNamespaces(txtFile, kotlinNamespace, javaNamespaceAndContext.first, javaNamespaceAndContext.second);
} }
@@ -105,7 +105,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
getTestRootDisposable(), ConfigurationKind.JDK_AND_ANNOTATIONS, TestJdkKind.MOCK_JDK); getTestRootDisposable(), ConfigurationKind.JDK_AND_ANNOTATIONS, TestJdkKind.MOCK_JDK);
Pair<NamespaceDescriptor, BindingContext> javaNamespaceAndContext = compileJavaAndLoadTestNamespaceAndBindingContextFromBinary( Pair<NamespaceDescriptor, BindingContext> javaNamespaceAndContext = compileJavaAndLoadTestNamespaceAndBindingContextFromBinary(
srcFiles, compiledDir, getTestRootDisposable(), ConfigurationKind.JDK_ONLY); srcFiles, compiledDir, getTestRootDisposable(), ConfigurationKind.ALL);
checkJavaNamespace(getTxtFile(javaFileName), javaNamespaceAndContext.first, javaNamespaceAndContext.second, configuration); checkJavaNamespace(getTxtFile(javaFileName), javaNamespaceAndContext.first, javaNamespaceAndContext.second, configuration);
} }
@@ -94,7 +94,6 @@ public final class LoadDescriptorUtil {
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests(
configurationKind, TestJdkKind.MOCK_JDK, JetTestUtils.getAnnotationsJar(), configurationKind, TestJdkKind.MOCK_JDK, JetTestUtils.getAnnotationsJar(),
javaRoot, javaRoot,
ForTestCompileRuntime.runtimeJarForTests(),
new File("compiler/tests") // for @ExpectLoadError annotation new File("compiler/tests") // for @ExpectLoadError annotation
); );
JetCoreEnvironment jetCoreEnvironment = new JetCoreEnvironment(disposable, configuration); JetCoreEnvironment jetCoreEnvironment = new JetCoreEnvironment(disposable, configuration);