Implement callable references to suspend functions
In FE they have type KSuspendFunctionN In BE they are treated like normal callable references with additional parameter in invoke function.
This commit is contained in:
@@ -981,8 +981,16 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
);
|
||||
|
||||
ClosureCodegen coroutineCodegen = CoroutineCodegenForLambda.create(this, descriptor, declaration, cv);
|
||||
ClosureContext closureContext = descriptor.isSuspend() ? this.context.intoCoroutineClosure(
|
||||
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
||||
descriptor,
|
||||
state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
||||
state.getBindingContext()
|
||||
),
|
||||
descriptor, this, state.getTypeMapper()
|
||||
) : this.context.intoClosure(descriptor, this, typeMapper);
|
||||
ClosureCodegen closureCodegen = coroutineCodegen != null ? coroutineCodegen : new ClosureCodegen(
|
||||
state, declaration, samType, context.intoClosure(descriptor, this, typeMapper),
|
||||
state, declaration, samType, closureContext,
|
||||
functionReferenceTarget, strategy, parentCodegen, cv
|
||||
);
|
||||
|
||||
@@ -1120,6 +1128,9 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
if (!isCrossinlineLambda) {
|
||||
v.aconst(null);
|
||||
}
|
||||
} else if (superClass != null && superClass.equals(state.getJvmRuntimeTypes().getFunctionReference())) {
|
||||
// Constructor of callable reference to suspend function does not accept continuation:
|
||||
// do nothing.
|
||||
}
|
||||
else {
|
||||
assert context.getFunctionDescriptor().isSuspend() : "Coroutines closure must be created only inside suspend functions";
|
||||
@@ -1128,7 +1139,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
|
||||
assert continuationValue != null : "Couldn't find a value for continuation parameter of " + context.getFunctionDescriptor();
|
||||
|
||||
callGenerator.putCapturedValueOnStack(continuationValue, continuationValue.type, paramIndex++);
|
||||
callGenerator.putCapturedValueOnStack(continuationValue, continuationValue.type, paramIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+39
-4
@@ -20,11 +20,16 @@ import kotlin.collections.CollectionsKt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.backend.common.CodegenUtil;
|
||||
import org.jetbrains.kotlin.codegen.coroutines.CoroutineCodegenUtilKt;
|
||||
import org.jetbrains.kotlin.codegen.state.GenerationState;
|
||||
import org.jetbrains.kotlin.config.LanguageFeature;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.resolve.BindingContext;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.DelegatingResolvedCall;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ExpressionValueArgument;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedValueArgument;
|
||||
import org.jetbrains.kotlin.resolve.calls.util.CallMaker;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver;
|
||||
@@ -73,8 +78,21 @@ public class FunctionReferenceGenerationStrategy extends FunctionGenerationStrat
|
||||
) {
|
||||
super(state);
|
||||
this.resolvedCall = resolvedCall;
|
||||
this.referencedFunction = (FunctionDescriptor) resolvedCall.getResultingDescriptor();
|
||||
this.functionDescriptor = functionDescriptor;
|
||||
if (resolvedCall.getResultingDescriptor() instanceof FunctionDescriptor &&
|
||||
((FunctionDescriptor) resolvedCall.getResultingDescriptor()).isSuspend()) {
|
||||
this.referencedFunction = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
||||
(FunctionDescriptor) resolvedCall.getResultingDescriptor(),
|
||||
state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
||||
state.getBindingContext());
|
||||
this.functionDescriptor = CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
||||
functionDescriptor,
|
||||
state.getLanguageVersionSettings().supportsFeature(LanguageFeature.ReleaseCoroutines),
|
||||
state.getBindingContext());
|
||||
}
|
||||
else {
|
||||
this.referencedFunction = (FunctionDescriptor) resolvedCall.getResultingDescriptor();
|
||||
this.functionDescriptor = functionDescriptor;
|
||||
}
|
||||
this.receiverType = receiverType;
|
||||
this.receiverValue = receiverValue;
|
||||
this.isInliningStrategy = isInliningStrategy;
|
||||
@@ -137,6 +155,18 @@ public class FunctionReferenceGenerationStrategy extends FunctionGenerationStrat
|
||||
public Map<ValueParameterDescriptor, ResolvedValueArgument> getValueArguments() {
|
||||
return argumentMap;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public CallableDescriptor getCandidateDescriptor() {
|
||||
return referencedFunction;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public CallableDescriptor getResultingDescriptor() {
|
||||
return referencedFunction;
|
||||
}
|
||||
};
|
||||
|
||||
StackValue result;
|
||||
@@ -172,7 +202,12 @@ public class FunctionReferenceGenerationStrategy extends FunctionGenerationStrat
|
||||
|
||||
Type type = state.getTypeMapper().mapType(parameter);
|
||||
int localIndex = codegen.myFrameMap.getIndex(parameter);
|
||||
codegen.tempVariables.put(fakeArgument.getArgumentExpression(), StackValue.local(localIndex, type));
|
||||
if (localIndex > 0) {
|
||||
codegen.tempVariables.put(fakeArgument.getArgumentExpression(), StackValue.local(localIndex, type));
|
||||
}
|
||||
else {
|
||||
codegen.tempVariables.put(fakeArgument.getArgumentExpression(), StackValue.local(parameter.getIndex() + 1 + receivers, type));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class JvmRuntimeTypes(module: ModuleDescriptor, private val languageVersionSetti
|
||||
private fun klass(name: String) = lazy { createClass(kotlinJvmInternalPackage, name) }
|
||||
|
||||
private val lambda: ClassDescriptor by klass("Lambda")
|
||||
private val functionReference: ClassDescriptor by klass("FunctionReference")
|
||||
val functionReference: ClassDescriptor by klass("FunctionReference")
|
||||
private val localVariableReference: ClassDescriptor by klass("LocalVariableReference")
|
||||
private val mutableLocalVariableReference: ClassDescriptor by klass("MutableLocalVariableReference")
|
||||
private val coroutineImplClass by lazy { createClass(kotlinCoroutinesJvmInternalPackage, "CoroutineImpl") }
|
||||
@@ -94,12 +94,14 @@ class JvmRuntimeTypes(module: ModuleDescriptor, private val languageVersionSetti
|
||||
val receivers = computeExpectedNumberOfReceivers(referencedFunction, isBound)
|
||||
|
||||
val functionType = createFunctionType(
|
||||
referencedFunction.builtIns,
|
||||
Annotations.EMPTY,
|
||||
if (isBound) null else referencedFunction.extensionReceiverParameter?.type ?: referencedFunction.dispatchReceiverParameter?.type,
|
||||
anonymousFunctionDescriptor.valueParameters.drop(receivers).map { it.type },
|
||||
null,
|
||||
referencedFunction.returnType!!
|
||||
referencedFunction.builtIns,
|
||||
Annotations.EMPTY,
|
||||
if (isBound) null else referencedFunction.extensionReceiverParameter?.type
|
||||
?: referencedFunction.dispatchReceiverParameter?.type,
|
||||
anonymousFunctionDescriptor.valueParameters.drop(receivers).map { it.type },
|
||||
null,
|
||||
referencedFunction.returnType!!,
|
||||
referencedFunction.isSuspend
|
||||
)
|
||||
|
||||
return listOf(functionReference.defaultType, functionType)
|
||||
|
||||
+20
@@ -404,6 +404,26 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
ClassDescriptor classDescriptor = recordClassForCallable(expression, callableDescriptor, supertypes, name);
|
||||
MutableClosure closure = recordClosure(classDescriptor, name);
|
||||
|
||||
if (callableDescriptor instanceof SimpleFunctionDescriptor) {
|
||||
SimpleFunctionDescriptor functionDescriptor = (SimpleFunctionDescriptor) callableDescriptor;
|
||||
if (functionDescriptor.isSuspend()){
|
||||
SimpleFunctionDescriptor jvmSuspendFunctionView =
|
||||
CoroutineCodegenUtilKt.getOrCreateJvmSuspendFunctionView(
|
||||
functionDescriptor,
|
||||
languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines),
|
||||
/*bindingContext*/ null
|
||||
);
|
||||
|
||||
bindingTrace.record(
|
||||
CodegenBinding.SUSPEND_FUNCTION_TO_JVM_VIEW,
|
||||
functionDescriptor,
|
||||
jvmSuspendFunctionView
|
||||
);
|
||||
|
||||
closure.setSuspend(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (receiverType != null) {
|
||||
closure.setCaptureReceiverType(receiverType);
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ class CoroutineCodegenForLambda private constructor(
|
||||
declaration: KtElement,
|
||||
classBuilder: ClassBuilder
|
||||
): ClosureCodegen? {
|
||||
if (!originalSuspendLambdaDescriptor.isSuspendLambdaOrLocalFunction()) return null
|
||||
if (!originalSuspendLambdaDescriptor.isSuspendLambdaOrLocalFunction() || declaration is KtCallableReferenceExpression) return null
|
||||
|
||||
return CoroutineCodegenForLambda(
|
||||
expressionCodegen,
|
||||
|
||||
@@ -42,10 +42,7 @@ import org.jetbrains.kotlin.load.kotlin.incremental.IncrementalPackageFragmentPr
|
||||
import org.jetbrains.kotlin.metadata.jvm.deserialization.JvmBytecodeBinaryVersion;
|
||||
import org.jetbrains.kotlin.name.*;
|
||||
import org.jetbrains.kotlin.platform.JavaToKotlinClassMap;
|
||||
import org.jetbrains.kotlin.psi.KtExpression;
|
||||
import org.jetbrains.kotlin.psi.KtFile;
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteral;
|
||||
import org.jetbrains.kotlin.psi.KtLambdaExpression;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.resolve.*;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.DefaultValueArgument;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
|
||||
@@ -56,6 +53,7 @@ import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodGenericSignature;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
||||
import org.jetbrains.kotlin.resolve.source.KotlinSourceElement;
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor;
|
||||
import org.jetbrains.kotlin.types.*;
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions;
|
||||
@@ -1017,7 +1015,7 @@ public class KotlinTypeMapper {
|
||||
|
||||
return OperatorNameConventions.INVOKE.asString();
|
||||
}
|
||||
else if (isLocalFunction(descriptor) || isFunctionExpression(descriptor)) {
|
||||
else if (isLocalFunction(descriptor) || isFunctionExpression(descriptor) || isSuspendFunctionReference(descriptor)) {
|
||||
return OperatorNameConventions.INVOKE.asString();
|
||||
}
|
||||
else {
|
||||
@@ -1025,6 +1023,13 @@ public class KotlinTypeMapper {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isSuspendFunctionReference(FunctionDescriptor descriptor) {
|
||||
return descriptor.getSource() instanceof KotlinSourceElement &&
|
||||
((KotlinSourceElement) descriptor.getSource()).getPsi() instanceof KtCallableReferenceExpression &&
|
||||
CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor) != null &&
|
||||
CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(descriptor).isSuspend();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static OwnerKind getKindForDefaultImplCall(@NotNull FunctionDescriptor baseMethodDescriptor) {
|
||||
DeclarationDescriptor containingDeclaration = baseMethodDescriptor.getContainingDeclaration();
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.resolve.calls
|
||||
import org.jetbrains.kotlin.builtins.getReturnTypeFromFunctionType
|
||||
import org.jetbrains.kotlin.builtins.getValueParameterTypesFromFunctionType
|
||||
import org.jetbrains.kotlin.builtins.isFunctionType
|
||||
import org.jetbrains.kotlin.builtins.isSuspendFunctionType
|
||||
import org.jetbrains.kotlin.contracts.EffectSystem
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
@@ -160,7 +161,8 @@ class CallCompleter(
|
||||
val expectedReturnType =
|
||||
if (call.isCallableReference()) {
|
||||
// TODO: compute generic type argument for R in the kotlin.Function<R> supertype (KT-12963)
|
||||
if (!TypeUtils.noExpectedType(expectedType) && expectedType.isFunctionType) expectedType.getReturnTypeFromFunctionType()
|
||||
if (!TypeUtils.noExpectedType(expectedType) && (expectedType.isFunctionType || expectedType.isSuspendFunctionType))
|
||||
expectedType.getReturnTypeFromFunctionType()
|
||||
else TypeUtils.NO_EXPECTED_TYPE
|
||||
} else expectedType
|
||||
|
||||
@@ -211,7 +213,7 @@ class CallCompleter(
|
||||
}
|
||||
}
|
||||
|
||||
if (call.isCallableReference() && !TypeUtils.noExpectedType(expectedType) && expectedType.isFunctionType) {
|
||||
if (call.isCallableReference() && !TypeUtils.noExpectedType(expectedType) && (expectedType.isFunctionType || expectedType.isSuspendFunctionType)) {
|
||||
updateSystemIfNeeded { builder ->
|
||||
candidateDescriptor.valueParameters.zip(expectedType.getValueParameterTypesFromFunctionType())
|
||||
.forEach { (parameter, argument) ->
|
||||
|
||||
+6
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.diagnostics.DiagnosticSink
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtCallableReferenceExpression
|
||||
import org.jetbrains.kotlin.psi.KtExpression
|
||||
import org.jetbrains.kotlin.psi.KtThisExpression
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
@@ -59,6 +60,8 @@ object CoroutineSuspendCallChecker : CallChecker {
|
||||
it.ownerDescriptor.safeAs<FunctionDescriptor>()?.isSuspend == true
|
||||
}?.cast<LexicalScope>()?.ownerDescriptor?.cast<FunctionDescriptor>()
|
||||
|
||||
val isCallableReference = resolvedCall.call.callElement.parent is KtCallableReferenceExpression
|
||||
|
||||
when {
|
||||
enclosingSuspendFunction != null -> {
|
||||
val callElement = resolvedCall.call.callElement as KtExpression
|
||||
@@ -77,6 +80,9 @@ object CoroutineSuspendCallChecker : CallChecker {
|
||||
|
||||
checkRestrictsSuspension(enclosingSuspendFunction, resolvedCall, reportOn, context)
|
||||
}
|
||||
isCallableReference -> {
|
||||
// do nothing: we can get callable reference to suspend function outside suspend context
|
||||
}
|
||||
else -> {
|
||||
when (descriptor) {
|
||||
is FunctionDescriptor -> context.trace.report(
|
||||
|
||||
+10
-4
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.types.expressions
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.ReflectionTypes
|
||||
import org.jetbrains.kotlin.builtins.isSuspendFunctionType
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
@@ -45,6 +46,7 @@ import org.jetbrains.kotlin.resolve.calls.util.CallMaker
|
||||
import org.jetbrains.kotlin.resolve.calls.util.FakeCallableDescriptorForObject
|
||||
import org.jetbrains.kotlin.resolve.calls.util.createValueParametersForInvokeInFunctionType
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtensionProperty
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ClassQualifier
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.Receiver
|
||||
@@ -585,7 +587,7 @@ class DoubleColonExpressionResolver(
|
||||
Annotations.EMPTY,
|
||||
CallableMemberDescriptor.Kind.DECLARATION,
|
||||
expression.toSourceElement(),
|
||||
/* isCoroutine = */ false
|
||||
/* isCoroutine = */ ReflectionTypes.isKSuspendFunction(type)
|
||||
)
|
||||
|
||||
functionDescriptor.initialize(
|
||||
@@ -636,8 +638,8 @@ class DoubleColonExpressionResolver(
|
||||
) {
|
||||
val descriptor =
|
||||
if (resolutionResults?.isSingleResult == true) resolutionResults.resultingDescriptor as? FunctionDescriptor else null
|
||||
if (descriptor?.isSuspend == true) {
|
||||
context.trace.report(UNSUPPORTED.on(expression.callableReference, "Callable references to suspend functions"))
|
||||
if (descriptor?.isSuspend == true && descriptor is PropertyDescriptor) {
|
||||
context.trace.report(UNSUPPORTED.on(expression.callableReference, "Callable references to suspend property"))
|
||||
}
|
||||
|
||||
val expressionResult = lhsResult as? DoubleColonLHS.Expression ?: return
|
||||
@@ -783,7 +785,11 @@ class DoubleColonExpressionResolver(
|
||||
val returnType = descriptor.returnType ?: return null
|
||||
val parametersTypes = descriptor.valueParameters.map { it.type }
|
||||
val parametersNames = descriptor.valueParameters.map { it.name }
|
||||
return reflectionTypes.getKFunctionType(
|
||||
return if (descriptor.isSuspend) reflectionTypes.getKSuspendFunctionType(
|
||||
Annotations.EMPTY, receiverType,
|
||||
parametersTypes, parametersNames, returnType, descriptor.builtIns
|
||||
)
|
||||
else reflectionTypes.getKFunctionType(
|
||||
Annotations.EMPTY, receiverType,
|
||||
parametersTypes, parametersNames, returnType, descriptor.builtIns
|
||||
)
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
suspend fun ok() = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = (A.Companion::ok)()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// SKIP_SOURCEMAP_REMAPPING
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun box(): String {
|
||||
val name = ::coroutineContext.name
|
||||
if (name != "coroutineContext") return "Fail 1: $name"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+97
@@ -0,0 +1,97 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
var result = ""
|
||||
|
||||
class A {
|
||||
suspend fun memberFunction() {
|
||||
result += "A.mf,"
|
||||
}
|
||||
|
||||
suspend fun aMemberFunction() {
|
||||
result += "A.amf,"
|
||||
}
|
||||
|
||||
suspend fun test(): String {
|
||||
(::memberFunction)()
|
||||
(::aExtensionFunction)()
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
inner class B {
|
||||
suspend fun memberFunction() {
|
||||
result += "B.mf,"
|
||||
}
|
||||
|
||||
suspend fun test(): String {
|
||||
(::aMemberFunction)()
|
||||
(::aExtensionFunction)()
|
||||
|
||||
(::memberFunction)()
|
||||
|
||||
(::bExtensionFunction)()
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun A.aExtensionFunction() {
|
||||
result += "A.ef,"
|
||||
}
|
||||
|
||||
suspend fun A.B.bExtensionFunction() {
|
||||
result += "B.ef,"
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var a = "FAIL 1"
|
||||
builder {
|
||||
a = A().test()
|
||||
}
|
||||
if (a != "A.mf,A.ef,") return "Fail $a"
|
||||
|
||||
result = ""
|
||||
var b = "FAIL 2"
|
||||
builder {
|
||||
b = A().B().test()
|
||||
}
|
||||
if (b != "A.amf,A.ef,B.mf,B.ef,") return "Fail $b"
|
||||
|
||||
result = ""
|
||||
builder {
|
||||
with(A()) {
|
||||
(::memberFunction)()
|
||||
(::aExtensionFunction)()
|
||||
}
|
||||
}
|
||||
if (result != "A.mf,A.ef,") return "Fail $result"
|
||||
|
||||
result = ""
|
||||
builder {
|
||||
with(A()) {
|
||||
with(B()) {
|
||||
(::aMemberFunction)()
|
||||
(::aExtensionFunction)()
|
||||
|
||||
(::memberFunction)()
|
||||
|
||||
(::bExtensionFunction)()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result != "A.amf,A.ef,B.mf,B.ef,") return "Fail $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
enum class E {
|
||||
A, B;
|
||||
|
||||
suspend fun foo() = this.name
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val f = E.A::foo
|
||||
val ef = E::foo
|
||||
|
||||
var res = ""
|
||||
builder {
|
||||
if (f() != "A") res = "Fail 1: ${f()}"
|
||||
else if (f == E.B::foo) res = "Fail 2"
|
||||
else if (ef != E::foo) res = "Fail 3"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// TODO: investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_REFLECT
|
||||
|
||||
class A
|
||||
|
||||
val a = A()
|
||||
val aa = A()
|
||||
|
||||
suspend fun A?.foo() {}
|
||||
|
||||
val aFoo = a::foo
|
||||
val A_foo = A::foo
|
||||
val nullFoo = null::foo
|
||||
|
||||
fun box(): String =
|
||||
when {
|
||||
nullFoo != null::foo -> "Bound extension refs with same receiver SHOULD be equal"
|
||||
nullFoo == aFoo -> "Bound extension refs with different receivers SHOULD NOT be equal"
|
||||
nullFoo == A_foo -> "Bound extension ref with receiver 'null' SHOULD NOT be equal to free ref"
|
||||
|
||||
else -> "OK"
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// TODO: investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
|
||||
package test
|
||||
|
||||
class A {
|
||||
suspend fun foo() {}
|
||||
suspend fun bar() {}
|
||||
}
|
||||
|
||||
val a = A()
|
||||
val aa = A()
|
||||
|
||||
val aFoo = a::foo
|
||||
val aBar = a::bar
|
||||
val aaFoo = aa::foo
|
||||
val A_foo = A::foo
|
||||
|
||||
fun box(): String =
|
||||
when {
|
||||
aFoo != a::foo -> "Bound refs with same receiver SHOULD be equal"
|
||||
aFoo == aBar -> "Bound refs to different members SHOULD NOT be equal"
|
||||
aFoo == aaFoo -> "Bound refs with different receiver SHOULD NOT be equal"
|
||||
aFoo == A_foo -> "Bound ref SHOULD NOT be equal to free ref"
|
||||
|
||||
else -> "OK"
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// TODO: investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.full.*
|
||||
|
||||
class C {
|
||||
suspend fun foo() {}
|
||||
}
|
||||
|
||||
val C_fooReflect = C::class.functions.find { it.name == "foo" }!!
|
||||
val C_foo = C::foo
|
||||
val cFoo = C()::foo
|
||||
|
||||
val Any.className: String
|
||||
get() = this::class.qualifiedName!!
|
||||
|
||||
fun box(): String =
|
||||
when {
|
||||
C_fooReflect != C_foo -> "C_fooReflect != C_foo, ${C_fooReflect.className}"
|
||||
C_foo != C_fooReflect -> "C_foo != C_fooReflect, ${C_foo.className}"
|
||||
C_fooReflect == cFoo -> "C_fooReflect == cFoo, ${C_fooReflect.className}"
|
||||
cFoo == C_fooReflect -> "cFoo == C_fooReflect, ${cFoo.className}"
|
||||
else -> "OK"
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
inline suspend fun foo(x: suspend () -> String) = x()
|
||||
|
||||
suspend fun String.id() = this
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = ""
|
||||
builder {
|
||||
res = foo("OK"::id)
|
||||
}
|
||||
return res
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
inline suspend fun go(f: suspend () -> String) = f()
|
||||
|
||||
suspend fun String.id(): String = this
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = "OK"
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = go(x::id)
|
||||
}
|
||||
return res
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
suspend fun foo(): Unit {}
|
||||
builder {
|
||||
assert(Unit.javaClass.equals(foo().javaClass))
|
||||
assert(Unit.javaClass.equals(foo()::class.java))
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A(var v: Int) {
|
||||
suspend fun f(x: Int) = x * v
|
||||
}
|
||||
|
||||
suspend fun A.g(x: Int) = x * f(x);
|
||||
|
||||
var A.w: Int
|
||||
get() = 1000 * v
|
||||
set(c: Int) {
|
||||
v = c + 10
|
||||
}
|
||||
|
||||
object F {
|
||||
var u = 0
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
val a = A(5)
|
||||
|
||||
val av = a::v
|
||||
if (av() != 5) throw RuntimeException("fail1: ${av()}")
|
||||
if (av.get() != 5) throw RuntimeException("fail2: ${av.get()}")
|
||||
av.set(7)
|
||||
if (a.v != 7) throw RuntimeException("fail3: ${a.v}")
|
||||
|
||||
val af = a::f
|
||||
if (af(10) != 70) throw RuntimeException("fail4: ${af(10)}")
|
||||
|
||||
val ag = a::g
|
||||
if (ag(10) != 700) throw RuntimeException("fail5: ${ag(10)}")
|
||||
|
||||
val aw = a::w
|
||||
if (aw() != 7000) throw RuntimeException("fail6: ${aw()}")
|
||||
if (aw.get() != 7000) throw RuntimeException("fail7: ${aw.get()}")
|
||||
aw.set(5)
|
||||
if (a.v != 15) throw RuntimeException("fail8: ${a.v}")
|
||||
|
||||
val fu = F::u
|
||||
if (fu() != 0) throw RuntimeException("fail9: ${fu()}")
|
||||
if (fu.get() != 0) throw RuntimeException("fail10: ${fu.get()}")
|
||||
fu.set(8)
|
||||
if (F.u != 8) throw RuntimeException("fail11: ${F.u}")
|
||||
|
||||
val x = 100
|
||||
|
||||
fun A.lf() = v * x;
|
||||
val alf = a::lf
|
||||
if (alf() != 1500) throw RuntimeException("fail9: ${alf()}")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun String?.ok() = "OK"
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = (null::ok)()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
object Singleton {
|
||||
suspend fun ok() = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = (Singleton::ok)()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun Boolean.foo() = 1
|
||||
suspend fun Byte.foo() = 2
|
||||
suspend fun Short.foo() = 3
|
||||
suspend fun Int.foo() = 4
|
||||
suspend fun Long.foo() = 5
|
||||
suspend fun Char.foo() = 6
|
||||
suspend fun Float.foo() = 7
|
||||
suspend fun Double.foo() = 8
|
||||
|
||||
fun testRef(name: String, f: suspend () -> Int, expected: Int) {
|
||||
builder {
|
||||
val actual = f()
|
||||
if (actual != expected) throw AssertionError("$name: $actual != $expected")
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
testRef("Boolean", true::foo, 1)
|
||||
testRef("Byte", 1.toByte()::foo, 2)
|
||||
testRef("Short", 1.toShort()::foo, 3)
|
||||
testRef("Int", 1::foo, 4)
|
||||
testRef("Long", 1L::foo, 5)
|
||||
testRef("Char", '1'::foo, 6)
|
||||
testRef("Float", 1.0F::foo, 7)
|
||||
testRef("Double", 1.0::foo, 8)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class B
|
||||
|
||||
suspend fun B.magic() {
|
||||
}
|
||||
|
||||
suspend fun suspendRun(c: suspend() -> Unit) = c()
|
||||
|
||||
fun boom(a: Any) {
|
||||
when (a) {
|
||||
is B -> builder { suspendRun(a::magic) }
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
boom(B())
|
||||
return "OK"
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
abstract suspend fun foo(): String
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override suspend fun foo() = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder { res = (A::foo)(B()) }
|
||||
return res
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
suspend fun foo(k: Int) = k
|
||||
|
||||
suspend fun result() = (A::foo)(this, 111)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = 0
|
||||
builder { result = A().result() }
|
||||
if (result != 111) return "Fail $result"
|
||||
return "OK"
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
suspend fun o() = 111
|
||||
suspend fun k(k: Int) = k
|
||||
}
|
||||
|
||||
suspend fun A.foo() = (A::o)(this) + (A::k)(this, 222)
|
||||
|
||||
fun box(): String {
|
||||
var result = 0
|
||||
builder { result = A().foo() }
|
||||
if (result != 333) return "Fail $result"
|
||||
return "OK"
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
suspend fun foo() = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = A::foo
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = x(A())
|
||||
}
|
||||
return res
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
suspend fun foo(result: String) = result
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = A::foo
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = x(A(), "OK")
|
||||
}
|
||||
return res
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
var result = "Fail"
|
||||
|
||||
suspend fun foo() {
|
||||
result = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
val x = A::foo
|
||||
builder { x(a) }
|
||||
return a.result
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
var result = "Fail"
|
||||
|
||||
suspend fun foo(newResult: String) {
|
||||
result = newResult
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
val x = A::foo
|
||||
builder { x(a, "OK") }
|
||||
return a.result
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
suspend fun result() = (A::foo)(this, "OK")
|
||||
}
|
||||
|
||||
suspend fun A.foo(x: String) = x
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder { res = A().result() }
|
||||
return res
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A
|
||||
|
||||
suspend fun A.foo() = (A::bar)(this, "OK")
|
||||
|
||||
suspend fun A.bar(x: String) = x
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = A().foo()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A
|
||||
|
||||
suspend fun A.foo() = "OK"
|
||||
|
||||
fun box(): String {
|
||||
val x = A::foo
|
||||
var res = "FAIL"
|
||||
builder { res = x(A()) }
|
||||
return res
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A
|
||||
|
||||
suspend fun A.foo(result: String) = result
|
||||
|
||||
fun box(): String {
|
||||
val x = A::foo
|
||||
var res = "FAIL"
|
||||
builder { res = x(A(), "OK") }
|
||||
return res
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
var result = "Fail"
|
||||
}
|
||||
|
||||
suspend fun A.foo() {
|
||||
result = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
val x = A::foo
|
||||
builder { x(a) }
|
||||
return a.result
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
var result = "Fail"
|
||||
}
|
||||
|
||||
suspend fun A.foo(newResult: String) {
|
||||
result = newResult
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
val x = A::foo
|
||||
builder { x(a, "OK") }
|
||||
return a.result
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun <T, R> foo(x: T): R = TODO()
|
||||
suspend fun <T> fooReturnInt(x: T): Int = 1
|
||||
suspend fun Int.suspendToString(): String = toString()
|
||||
|
||||
suspend inline fun <reified T, reified R> check(x: T, y: R, f: suspend (T) -> R, tType: String, rType: String) {
|
||||
assertEquals(tType, T::class.simpleName)
|
||||
assertEquals(rType, R::class.simpleName)
|
||||
}
|
||||
|
||||
suspend inline fun <reified T, reified R> check(f: suspend (T) -> R, g: suspend (T) -> R, tType: String, rType: String) {
|
||||
assertEquals(tType, T::class.simpleName)
|
||||
assertEquals(rType, R::class.simpleName)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
check("", 1, ::foo, "String", "Int")
|
||||
check("", 1, ::fooReturnInt, "String", "Int")
|
||||
check("", "", ::fooReturnInt, "String", "Any")
|
||||
|
||||
check(Int::suspendToString, ::foo, "Int", "String")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun <T, R> foo(x: T): R = TODO()
|
||||
|
||||
suspend inline fun <reified T, reified R> bar(x: T, y: R, f: suspend (T) -> R, tType: String, rType: String): Pair<T, R?> {
|
||||
assertEquals(tType, T::class.simpleName)
|
||||
assertEquals(rType, R::class.simpleName)
|
||||
return Pair(x, y)
|
||||
}
|
||||
|
||||
data class Pair<A, B>(val a: A, val b: B)
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
bar(1, "", ::foo, "Int", "String")
|
||||
|
||||
val s1: Pair<Int, String?> = bar(1, "", ::foo, "Int", "String")
|
||||
val (a: Int, b: String?) = bar(1, "", ::foo, "Int", "String")
|
||||
|
||||
val ns: String? = null
|
||||
bar(ns, ns, ::foo, "String", "String")
|
||||
|
||||
val s2: Pair<Int?, String?> = bar(null, null, ::foo, "Int", "String")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun foo(x: Int?) {}
|
||||
suspend fun foo(y: String?) {}
|
||||
suspend fun foo(z: Boolean) {}
|
||||
|
||||
suspend inline fun <reified T> bar(f: suspend (T) -> Unit, tType: String): T? {
|
||||
assertEquals(tType, T::class.simpleName)
|
||||
return null
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
val a1: Int? = bar(::foo, "Int")
|
||||
val a2: String? = bar(::foo, "String")
|
||||
val a3: Boolean? = bar<Boolean>(::foo, "Boolean")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A<T>(val t: T) {
|
||||
suspend fun foo(): T = t
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = (A<String>::foo)(A("OK"))
|
||||
}
|
||||
return res
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.jvm.internal.FunctionBase
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
suspend fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun test(f: Function<*>, arity: Int) {
|
||||
assertEquals(arity, (f as FunctionBase).getArity())
|
||||
}
|
||||
|
||||
suspend fun foo(s: String, i: Int) {}
|
||||
class A {
|
||||
suspend fun bar(s: String, i: Int) {}
|
||||
}
|
||||
|
||||
suspend fun Double.baz(s: String, i: Int) {}
|
||||
|
||||
fun box(): String {
|
||||
test(::foo, 2 + 1)
|
||||
test(A::bar, 3 + 1)
|
||||
test(Double::baz, 3 + 1)
|
||||
|
||||
test(::box, 0)
|
||||
|
||||
suspend fun local(x: Int) {}
|
||||
test(::local, 1 + 1)
|
||||
|
||||
// TODO: Uncomment when `suspend fun` will be supported
|
||||
// test(suspend fun(s: String) = s, 1)
|
||||
// test(suspend fun(){}, 0)
|
||||
test(suspend {}, 1)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class Outer {
|
||||
val result = "OK"
|
||||
|
||||
inner class Inner {
|
||||
suspend fun foo() = result
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val f = Outer.Inner::foo
|
||||
var res = "FAIL"
|
||||
builder { res = f(Outer().Inner()) }
|
||||
return res
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
class Local {
|
||||
suspend fun foo() = "OK"
|
||||
}
|
||||
|
||||
val ref = Local::foo
|
||||
var res = "FAIL"
|
||||
builder { res = ref(Local()) }
|
||||
return res
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "Fail"
|
||||
|
||||
suspend fun changeToOK() { result = "OK" }
|
||||
|
||||
val ok = ::changeToOK
|
||||
builder { ok() }
|
||||
return result
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
interface Named {
|
||||
suspend fun name() = "OK"
|
||||
}
|
||||
|
||||
enum class E : Named {
|
||||
OK
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder { res = E.OK.name }
|
||||
return res
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// COMMON_COROUTINES_TEST
|
||||
|
||||
fun box(): String {
|
||||
suspend fun bar() {}
|
||||
suspend fun baz() {}
|
||||
|
||||
if (!::bar.equals(::bar)) return "Fail 1"
|
||||
if (::bar.hashCode() != ::bar.hashCode()) return "Fail 2"
|
||||
|
||||
if (::bar == ::baz) return "Fail 3"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A
|
||||
|
||||
fun box(): String {
|
||||
suspend fun A.foo() = "OK"
|
||||
var res = "FAIL"
|
||||
builder { res = (A::foo)(A()) }
|
||||
return res
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
class A
|
||||
suspend fun A.foo() = "OK"
|
||||
var res = "FAIL"
|
||||
builder { res = (A::foo)((::A)()) }
|
||||
return res
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
suspend fun Int.is42With(that: Int) = this + 2 * that == 42
|
||||
var res = ""
|
||||
builder { res = if ((Int::is42With)(16, 13)) "OK" else "Fail" }
|
||||
return res
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A
|
||||
|
||||
fun box(): String {
|
||||
var result = "Fail"
|
||||
|
||||
suspend fun A.ext() { result = "OK" }
|
||||
|
||||
val f = A::ext
|
||||
builder { f(A()) }
|
||||
return result
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
class Id<T> {
|
||||
suspend fun invoke(t: T) = t
|
||||
}
|
||||
|
||||
val ref = Id<String>::invoke
|
||||
var res = "FAIL"
|
||||
builder { res = ref(Id<String>(), "OK") }
|
||||
return res
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = "OK"
|
||||
|
||||
class Local {
|
||||
suspend fun foo() = result
|
||||
}
|
||||
|
||||
val member = Local::foo
|
||||
val instance = Local()
|
||||
var res = "FAIL"
|
||||
builder { res = member(instance) }
|
||||
return res
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
|
||||
fun box(): String {
|
||||
suspend fun OK() {}
|
||||
|
||||
return ::OK.name
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
suspend fun foo(): String {
|
||||
suspend fun bar() = "OK"
|
||||
val ref = ::bar
|
||||
return ref()
|
||||
}
|
||||
|
||||
val ref = ::foo
|
||||
var res = "FAIL"
|
||||
builder { res = ref() }
|
||||
return res
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
suspend fun foo() = "OK"
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = (::foo)()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = "OK"
|
||||
|
||||
suspend fun foo() = result
|
||||
|
||||
var res = "FAIL"
|
||||
|
||||
builder {
|
||||
res = (::foo)()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
suspend fun foo(s: String) = s
|
||||
var res = "FAIL"
|
||||
builder { res = (::foo)("OK") }
|
||||
return res
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
var state = 23
|
||||
|
||||
fun box(): String {
|
||||
suspend fun incrementState(inc: Int) {
|
||||
state += inc
|
||||
}
|
||||
|
||||
val inc = ::incrementState
|
||||
builder {
|
||||
inc(12)
|
||||
inc(-5)
|
||||
inc(27)
|
||||
inc(-15)
|
||||
}
|
||||
|
||||
return if (state == 42) "OK" else "Fail $state"
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun foo(): String = "foo1"
|
||||
suspend fun foo(i: Int): String = "foo2"
|
||||
|
||||
val f1: suspend () -> String = ::foo
|
||||
val f2: suspend (Int) -> String = ::foo
|
||||
|
||||
suspend fun foo1() {}
|
||||
suspend fun foo2(i: Int) {}
|
||||
|
||||
suspend fun bar(f: suspend () -> Unit): String = "bar1"
|
||||
suspend fun bar(f: suspend (Int) -> Unit): String = "bar2"
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
val x1 = f1()
|
||||
if (x1 != "foo1") throw RuntimeException("Fail 1: $x1")
|
||||
|
||||
val x2 = f2(0)
|
||||
if (x2 != "foo2") throw RuntimeException("Fail 2: $x2")
|
||||
|
||||
val y1 = bar(::foo1)
|
||||
if (y1 != "bar1") throw RuntimeException("Fail 3: $y1")
|
||||
|
||||
val y2 = bar(::foo2)
|
||||
if (y2 != "bar2") throw RuntimeException("Fail 4: $y2")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import kotlin.reflect.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
val x = 1
|
||||
suspend fun x(): String = "OK"
|
||||
}
|
||||
|
||||
val f1: KProperty1<A, Int> = A::x
|
||||
val f2: suspend (A) -> String = A::x
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
val x1 = f1.get(a)
|
||||
if (x1 != 1) return "Fail 1: $x1"
|
||||
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = f2(a)
|
||||
}
|
||||
return res
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class A {
|
||||
private suspend fun foo() = "OK"
|
||||
|
||||
suspend fun bar() = (A::foo)(this)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = A().bar()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun baz(i: Int) = i
|
||||
suspend fun <T> bar(x: T): T = x
|
||||
|
||||
suspend fun nullableFun(): (suspend (Int) -> Int)? = null
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
val x1: suspend (Int) -> Int = bar(if (true) ::baz else ::baz)
|
||||
val x2: suspend (Int) -> Int = bar(nullableFun() ?: ::baz)
|
||||
val x3: suspend (Int) -> Int = bar(::baz ?: ::baz)
|
||||
|
||||
val i = 0
|
||||
val x4: suspend (Int) -> Int = bar(when (i) {
|
||||
10 -> ::baz
|
||||
20 -> ::baz
|
||||
else -> ::baz
|
||||
})
|
||||
|
||||
val x5: suspend (Int) -> Int = bar(::baz!!)
|
||||
|
||||
if (x1(1) != 1) throw RuntimeException("fail 1")
|
||||
if (x2(1) != 1) throw RuntimeException("fail 2")
|
||||
if (x3(1) != 1) throw RuntimeException("fail 3")
|
||||
if (x4(1) != 1) throw RuntimeException("fail 4")
|
||||
if (x5(1) != 1) throw RuntimeException("fail 5")
|
||||
|
||||
if ((if (true) ::baz else ::baz)(1) != 1) throw RuntimeException("fail 6")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun foo(o: Int, k: Int) = o + k
|
||||
|
||||
class A {
|
||||
suspend fun bar() = (::foo)(111, 222)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = 0
|
||||
builder { result = A().bar() }
|
||||
if (result != 333) return "Fail $result"
|
||||
return "OK"
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun foo(o: Int, k: Int) = o + k
|
||||
|
||||
class A
|
||||
|
||||
suspend fun A.bar() = (::foo)(111, 222)
|
||||
|
||||
fun box(): String {
|
||||
var result = 0
|
||||
builder { result = A().bar() }
|
||||
if (result != 333) return "Fail $result"
|
||||
return "OK"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun foo() = "OK"
|
||||
|
||||
fun box(): String {
|
||||
val x = ::foo
|
||||
var res = "FAIL"
|
||||
builder { res = x() }
|
||||
return res
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun foo(x: String) = x
|
||||
|
||||
fun box(): String {
|
||||
val x = ::foo
|
||||
var res = "FAIL"
|
||||
builder { res = x("OK") }
|
||||
return res
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
var result = "Fail"
|
||||
|
||||
suspend fun foo() {
|
||||
result = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = ::foo
|
||||
builder { x() }
|
||||
return result
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
var result = "Fail"
|
||||
|
||||
suspend fun foo(newResult: String) {
|
||||
result = newResult
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = ::foo
|
||||
builder { x("OK") }
|
||||
return result
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
interface T {
|
||||
suspend fun foo() = "OK"
|
||||
}
|
||||
|
||||
class B : T {
|
||||
inner class C {
|
||||
suspend fun bar() = (T::foo)(this@B)
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = B().C().bar()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
interface A {
|
||||
suspend fun foo(): String
|
||||
}
|
||||
|
||||
class B : A {
|
||||
override suspend fun foo() = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = (A::foo)(B())
|
||||
}
|
||||
return res
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// WITH_RUNTIME
|
||||
// COMMON_COROUTINES_TEST
|
||||
|
||||
import java.io.*
|
||||
import kotlin.test.*
|
||||
|
||||
class Foo {
|
||||
suspend fun method() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val baos = ByteArrayOutputStream()
|
||||
val oos = ObjectOutputStream(baos)
|
||||
oos.writeObject(Foo::method)
|
||||
oos.writeObject(::Foo)
|
||||
oos.close()
|
||||
|
||||
val bais = ByteArrayInputStream(baos.toByteArray())
|
||||
val ois = ObjectInputStream(bais)
|
||||
assertEquals(Foo::method, ois.readObject())
|
||||
assertEquals(::Foo, ois.readObject())
|
||||
ois.close()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.io.*
|
||||
import kotlin.test.*
|
||||
|
||||
suspend fun bar() {}
|
||||
|
||||
fun box(): String {
|
||||
val baos = ByteArrayOutputStream()
|
||||
val oos = ObjectOutputStream(baos)
|
||||
oos.writeObject(::bar)
|
||||
oos.close()
|
||||
|
||||
val bais = ByteArrayInputStream(baos.toByteArray())
|
||||
val ois = ObjectInputStream(bais)
|
||||
val o = ois.readObject()
|
||||
ois.close()
|
||||
|
||||
// Test that we don't serialize the reflected view of the reference: it's not needed because it can be restored at runtime
|
||||
val field = kotlin.jvm.internal.CallableReference::class.java.getDeclaredField("reflected").apply { isAccessible = true }
|
||||
assertNull(field.get(o))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.io.*
|
||||
import kotlin.test.*
|
||||
|
||||
class Foo {
|
||||
suspend fun method() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val baos = ByteArrayOutputStream()
|
||||
val oos = ObjectOutputStream(baos)
|
||||
oos.writeObject(Foo::method)
|
||||
oos.writeObject(::Foo)
|
||||
oos.close()
|
||||
|
||||
val bais = ByteArrayInputStream(baos.toByteArray())
|
||||
val ois = ObjectInputStream(bais)
|
||||
assertEquals(Foo::method, ois.readObject())
|
||||
assertEquals(::Foo, ois.readObject())
|
||||
ois.close()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Generated
+857
@@ -6282,6 +6282,863 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReference extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Bound extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBound() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyLHS.kt")
|
||||
public void testEmptyLHS() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localUnitFunction.kt")
|
||||
public void testLocalUnitFunction_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localUnitFunction.kt")
|
||||
public void testLocalUnitFunction_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equals extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inline extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInline() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Function extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFunction() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("getArityViaFunctionImpl.kt")
|
||||
public void testGetArityViaFunctionImpl() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Local extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLocal() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Serializability extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSerializability() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+857
@@ -6282,6 +6282,863 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReference extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Bound extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBound() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyLHS.kt")
|
||||
public void testEmptyLHS() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localUnitFunction.kt")
|
||||
public void testLocalUnitFunction_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localUnitFunction.kt")
|
||||
public void testLocalUnitFunction_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equals extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inline extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInline() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Function extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFunction() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("getArityViaFunctionImpl.kt")
|
||||
public void testGetArityViaFunctionImpl() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Local extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLocal() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Serializability extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSerializability() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+857
@@ -6282,6 +6282,863 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReference extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Bound extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBound() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyLHS.kt")
|
||||
public void testEmptyLHS() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localUnitFunction.kt")
|
||||
public void testLocalUnitFunction_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localUnitFunction.kt")
|
||||
public void testLocalUnitFunction_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/localUnitFunction.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equals extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inline extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInline() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Function extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFunction() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("getArityViaFunctionImpl.kt")
|
||||
public void testGetArityViaFunctionImpl() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Local extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLocal() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Serializability extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSerializability() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -96,6 +96,13 @@ object JavaToKotlinClassMap : PlatformToKotlinClassMap {
|
||||
val kFun = kFunction.packageFqName.toString() + "." + kFunction.classNamePrefix
|
||||
addKotlinToJava(FqName(kFun + i), ClassId.topLevel(FqName(kFun)))
|
||||
}
|
||||
for (i in 0 until 22) {
|
||||
val kSuspendFunction = FunctionClassDescriptor.Kind.KSuspendFunction
|
||||
val kFunction = FunctionClassDescriptor.Kind.KFunction
|
||||
val kSuspendFun = kSuspendFunction.packageFqName.toString() + "." + kSuspendFunction.classNamePrefix
|
||||
val kFun = kFunction.packageFqName.toString() + "." + kFunction.classNamePrefix
|
||||
addKotlinToJava(FqName(kSuspendFun + i), ClassId.topLevel(FqName(kFun)))
|
||||
}
|
||||
|
||||
addKotlinToJava(FQ_NAMES.nothing.toSafe(), classId(Void::class.java))
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import kotlin.reflect.KProperty
|
||||
|
||||
val KOTLIN_REFLECT_FQ_NAME = FqName("kotlin.reflect")
|
||||
val K_FUNCTION_PREFIX = "KFunction"
|
||||
val K_SUSPEND_FUNCTION_PREFIX = "KSuspendFunction"
|
||||
|
||||
class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: NotFoundClasses) {
|
||||
private val kotlinReflectScope: MemberScope by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
||||
@@ -49,6 +50,7 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
}
|
||||
|
||||
fun getKFunction(n: Int): ClassDescriptor = find("$K_FUNCTION_PREFIX$n", n + 1)
|
||||
fun getKSuspendFunction(n: Int): ClassDescriptor = find("$K_SUSPEND_FUNCTION_PREFIX$n", n + 1)
|
||||
|
||||
val kClass: ClassDescriptor by ClassLookup(1)
|
||||
val kProperty0: ClassDescriptor by ClassLookup(1)
|
||||
@@ -74,6 +76,19 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
return KotlinTypeFactory.simpleNotNullType(annotations, classDescriptor, arguments)
|
||||
}
|
||||
|
||||
fun getKSuspendFunctionType(
|
||||
annotations: Annotations,
|
||||
receiverType: KotlinType?,
|
||||
parameterTypes: List<KotlinType>,
|
||||
parameterNames: List<Name>?,
|
||||
returnType: KotlinType,
|
||||
builtIns: KotlinBuiltIns
|
||||
): SimpleType {
|
||||
val arguments = getFunctionTypeArgumentProjections(receiverType, parameterTypes, parameterNames, returnType, builtIns)
|
||||
val classDescriptor = getKSuspendFunction(arguments.size - 1 /* return type */)
|
||||
return KotlinTypeFactory.simpleNotNullType(annotations, classDescriptor, arguments)
|
||||
}
|
||||
|
||||
fun getKPropertyType(annotations: Annotations, receiverTypes: List<KotlinType>, returnType: KotlinType, mutable: Boolean): SimpleType {
|
||||
val classDescriptor = when (receiverTypes.size) {
|
||||
0 -> when {
|
||||
@@ -102,7 +117,7 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
}
|
||||
|
||||
fun isCallableType(type: KotlinType): Boolean =
|
||||
type.isFunctionTypeOrSubtype || isKCallableType(type)
|
||||
type.isFunctionTypeOrSubtype || type.isSuspendFunctionType || isKCallableType(type)
|
||||
|
||||
@JvmStatic
|
||||
fun isNumberedKPropertyOrKMutablePropertyType(type: KotlinType): Boolean =
|
||||
@@ -130,9 +145,14 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
val descriptor = type.constructor.declarationDescriptor as? ClassDescriptor ?: return false
|
||||
val shortName = descriptor.name.asString()
|
||||
|
||||
return shortName.length > K_FUNCTION_PREFIX.length &&
|
||||
shortName.startsWith(K_FUNCTION_PREFIX) &&
|
||||
DescriptorUtils.getFqName(descriptor).parent().toSafe() == KOTLIN_REFLECT_FQ_NAME
|
||||
return (shortName.length > K_FUNCTION_PREFIX.length && shortName.startsWith(K_FUNCTION_PREFIX) || isKSuspendFunction(type)) &&
|
||||
DescriptorUtils.getFqName(descriptor).parent().toSafe() == KOTLIN_REFLECT_FQ_NAME
|
||||
}
|
||||
|
||||
fun isKSuspendFunction(type: KotlinType): Boolean {
|
||||
val descriptor = type.constructor.declarationDescriptor as? ClassDescriptor ?: return false
|
||||
val shortName = descriptor.name.asString()
|
||||
return shortName.length > K_SUSPEND_FUNCTION_PREFIX.length && shortName.startsWith(K_SUSPEND_FUNCTION_PREFIX)
|
||||
}
|
||||
|
||||
private fun hasFqName(typeConstructor: TypeConstructor, fqName: FqNameUnsafe): Boolean {
|
||||
@@ -162,6 +182,7 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
val packageName = fqName.parent().toSafe()
|
||||
if (packageName == KOTLIN_REFLECT_FQ_NAME) {
|
||||
return shortName.startsWith("KFunction") // KFunctionN, KFunction
|
||||
|| shortName.startsWith("KSuspendFunction") // KPropertyN, KProperty
|
||||
|| shortName.startsWith("KProperty") // KPropertyN, KProperty
|
||||
|| shortName.startsWith("KMutableProperty") // KMutablePropertyN, KMutableProperty
|
||||
|| shortName == "KCallable" || shortName == "KAnnotatedElement"
|
||||
@@ -169,6 +190,7 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
}
|
||||
if (packageName == KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME) {
|
||||
return shortName.startsWith("Function") // FunctionN, Function
|
||||
|| shortName.startsWith("SuspendFunction")
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
+2
-4
@@ -67,7 +67,8 @@ class BuiltInFictitiousFunctionClassFactory(
|
||||
|
||||
override fun shouldCreateClass(packageFqName: FqName, name: Name): Boolean {
|
||||
val string = name.asString()
|
||||
return (string.startsWith("Function") || string.startsWith("KFunction")) // an optimization
|
||||
return (string.startsWith("Function") || string.startsWith("KFunction") ||
|
||||
string.startsWith("SuspendFunction") || string.startsWith("KSuspendFunction")) // an optimization
|
||||
&& parseClassName(string, packageFqName) != null
|
||||
}
|
||||
|
||||
@@ -80,9 +81,6 @@ class BuiltInFictitiousFunctionClassFactory(
|
||||
val packageFqName = classId.packageFqName
|
||||
val (kind, arity) = parseClassName(className, packageFqName) ?: return null
|
||||
|
||||
// SuspendFunction$n can't be created by classId
|
||||
if (kind == Kind.SuspendFunction) return null
|
||||
|
||||
val containingPackageFragment = module.getPackage(packageFqName).fragments.filterIsInstance<BuiltInsPackageFragment>().first()
|
||||
|
||||
return FunctionClassDescriptor(storageManager, containingPackageFragment, kind, arity)
|
||||
|
||||
+14
-8
@@ -39,7 +39,8 @@ class FunctionClassDescriptor(
|
||||
enum class Kind(val packageFqName: FqName, val classNamePrefix: String) {
|
||||
Function(BUILT_INS_PACKAGE_FQ_NAME, "Function"),
|
||||
SuspendFunction(BUILT_INS_PACKAGE_FQ_NAME, "SuspendFunction"),
|
||||
KFunction(KOTLIN_REFLECT_FQ_NAME, "KFunction");
|
||||
KFunction(KOTLIN_REFLECT_FQ_NAME, "KFunction"),
|
||||
KSuspendFunction(KOTLIN_REFLECT_FQ_NAME, "KSuspendFunction");
|
||||
|
||||
fun numberedClassName(arity: Int) = Name.identifier("$classNamePrefix$arity")
|
||||
|
||||
@@ -118,13 +119,13 @@ class FunctionClassDescriptor(
|
||||
}
|
||||
|
||||
|
||||
if (functionKind == Kind.SuspendFunction) {
|
||||
// SuspendFunction$N<...> <: Any
|
||||
result.add(containingDeclaration.builtIns.anyType)
|
||||
}
|
||||
else {
|
||||
// Add unnumbered base class, e.g. Function for Function{n}, KFunction for KFunction{n}
|
||||
add(containingDeclaration, Name.identifier(functionKind.classNamePrefix))
|
||||
when (functionKind) {
|
||||
Kind.SuspendFunction -> // SuspendFunction$N<...> <: Function
|
||||
add(containingDeclaration, Name.identifier("Function"))
|
||||
Kind.KSuspendFunction -> // KSuspendFunction$N<...> <: KFunction
|
||||
add(containingDeclaration, Name.identifier("KFunction"))
|
||||
else -> // Add unnumbered base class, e.g. Function for Function{n}, KFunction for KFunction{n}
|
||||
add(containingDeclaration, Name.identifier(functionKind.classNamePrefix))
|
||||
}
|
||||
|
||||
// For KFunction{n}, add corresponding numbered Function{n} class, e.g. Function2 for KFunction2
|
||||
@@ -133,6 +134,11 @@ class FunctionClassDescriptor(
|
||||
val kotlinPackageFragment = packageView.fragments.filterIsInstance<BuiltInsPackageFragment>().first()
|
||||
|
||||
add(kotlinPackageFragment, Kind.Function.numberedClassName(arity))
|
||||
} else if (functionKind == Kind.KSuspendFunction) {
|
||||
val packageView = containingDeclaration.containingDeclaration.getPackage(BUILT_INS_PACKAGE_FQ_NAME)
|
||||
val kotlinPackageFragment = packageView.fragments.filterIsInstance<BuiltInsPackageFragment>().first()
|
||||
|
||||
add(kotlinPackageFragment, Kind.SuspendFunction.numberedClassName(arity))
|
||||
}
|
||||
|
||||
return result.toList()
|
||||
|
||||
+845
@@ -5487,6 +5487,851 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReference extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Bound extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBound() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectReceiver.kt")
|
||||
public void testCompanionObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/companionObjectReceiver.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContext.kt")
|
||||
public void testCoroutineContext_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/coroutineContext.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyLHS.kt")
|
||||
public void testEmptyLHS() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/emptyLHS.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntryMember.kt")
|
||||
public void testEnumEntryMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/enumEntryMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("multiCase.kt")
|
||||
public void testMultiCase_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/multiCase.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("nullReceiver.kt")
|
||||
public void testNullReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/nullReceiver.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("objectReceiver.kt")
|
||||
public void testObjectReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/objectReceiver.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("primitiveReceiver.kt")
|
||||
public void testPrimitiveReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/primitiveReceiver.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCastForExtensionReceiver.kt")
|
||||
public void testSmartCastForExtensionReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/smartCastForExtensionReceiver.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equals extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nullableReceiverInEquals.kt")
|
||||
public void testNullableReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/nullableReceiverInEquals.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("receiverInEquals.kt")
|
||||
public void testReceiverInEquals_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/receiverInEquals.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionReference.kt")
|
||||
public void testReflectionReference_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/equals/reflectionReference.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inline extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInline() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleVal.kt")
|
||||
public void testSimpleVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simpleVal.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound/inline/simple.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Function extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstractClassMember.kt")
|
||||
public void testAbstractClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/abstractClassMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFunction() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromClass.kt")
|
||||
public void testClassMemberFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromClass.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromExtension.kt")
|
||||
public void testClassMemberFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromExtension.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringNoArgs.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelStringOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitNoArgs.kt")
|
||||
public void testClassMemberFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt")
|
||||
public void testClassMemberFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromClass.kt")
|
||||
public void testExtensionFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromClass.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromExtension.kt")
|
||||
public void testExtensionFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromExtension.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringNoArgs.kt")
|
||||
public void testExtensionFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringNoArgs.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelStringOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelStringOneStringArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitNoArgs.kt")
|
||||
public void testExtensionFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitNoArgs.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionFromTopLevelUnitOneStringArg.kt")
|
||||
public void testExtensionFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferenceArguments.kt")
|
||||
public void testGenericCallableReferenceArguments_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferenceArguments.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithNullableTypes.kt")
|
||||
public void testGenericCallableReferencesWithNullableTypes_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithNullableTypes.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("genericCallableReferencesWithOverload.kt")
|
||||
public void testGenericCallableReferencesWithOverload_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericCallableReferencesWithOverload.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/genericMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("getArityViaFunctionImpl.kt")
|
||||
public void testGetArityViaFunctionImpl() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/getArityViaFunctionImpl.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFunVsVal.kt")
|
||||
public void testOverloadedFunVsVal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFunVsVal.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedFun.kt")
|
||||
public void testOverloadedFun_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/overloadedFun.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("privateClassMember.kt")
|
||||
public void testPrivateClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/privateClassMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCalls.kt")
|
||||
public void testSpecialCalls_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/specialCalls.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromClass.kt")
|
||||
public void testTopLevelFromClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromClass.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromExtension.kt")
|
||||
public void testTopLevelFromExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromExtension.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelStringNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringNoArgs.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelStringOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelStringOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitNoArgs.kt")
|
||||
public void testTopLevelFromTopLevelUnitNoArgs_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt")
|
||||
public void testTopLevelFromTopLevelUnitOneStringArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("traitImplMethodWithClassReceiver.kt")
|
||||
public void testTraitImplMethodWithClassReceiver_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitImplMethodWithClassReceiver.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("traitMember.kt")
|
||||
public void testTraitMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/traitMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Local extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLocal() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("captureOuter.kt")
|
||||
public void testCaptureOuter_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/captureOuter.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("classMember.kt")
|
||||
public void testClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/classMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSideEffect.kt")
|
||||
public void testClosureWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/closureWithSideEffect.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("enumExtendsTrait.kt")
|
||||
public void testEnumExtendsTrait_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/enumExtendsTrait.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCode.kt")
|
||||
public void testEqualsHashCode_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/equalsHashCode.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToLocalClass.kt")
|
||||
public void testExtensionToLocalClass_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToLocalClass.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionToPrimitive.kt")
|
||||
public void testExtensionToPrimitive_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionToPrimitive.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionWithClosure.kt")
|
||||
public void testExtensionWithClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extensionWithClosure.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/extension.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("genericMember.kt")
|
||||
public void testGenericMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/genericMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassMember.kt")
|
||||
public void testLocalClassMember_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localClassMember.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localFunctionName.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/localLocal.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClosure.kt")
|
||||
public void testSimpleClosure_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleClosure.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleWithArg.kt")
|
||||
public void testSimpleWithArg_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simpleWithArg.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/simple.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("unitWithSideEffect.kt")
|
||||
public void testUnitWithSideEffect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local/unitWithSideEffect.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Serializability extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSerializability() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("noReflect.kt")
|
||||
public void testNoReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/noReflect.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectedIsNotSerialized.kt")
|
||||
public void testReflectedIsNotSerialized_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/reflectedIsNotSerialized.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("withReflect.kt")
|
||||
public void testWithReflect_1_2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/serializability/withReflect.kt");
|
||||
try {
|
||||
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user