use of org.jetbrains.kotlin.js.backend.ast.JsStringLiteral in project kotlin by JetBrains.
the class JSTestGenerator method generateCodeForTestMethod.
private static void generateCodeForTestMethod(@NotNull TranslationContext context, @NotNull FunctionDescriptor functionDescriptor, @NotNull ClassDescriptor classDescriptor, @NotNull JSTester tester) {
JsExpression expression = ReferenceTranslator.translateAsValueReference(classDescriptor, context);
JsNew testClass = new JsNew(expression);
JsExpression functionToTestCall = CallTranslator.INSTANCE.buildCall(context, functionDescriptor, Collections.<JsExpression>emptyList(), testClass);
JsStringLiteral testName = context.program().getStringLiteral(classDescriptor.getName() + "." + functionDescriptor.getName());
tester.constructTestMethodInvocation(functionToTestCall, testName);
}
Aggregations