From d937909ebf5096dcdee0cbd3d624c34c34c6ae5c Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Wed, 20 Nov 2013 21:00:25 +0400 Subject: [PATCH] Separated test data depending on target platform (JS/JVM) --- .../{ => js}/outputPostfixFileNotFound.args | 0 .../{ => js}/outputPostfixFileNotFound.out | 0 .../{ => js}/outputPrefixFileNotFound.args | 0 .../cli/{ => js}/outputPrefixFileNotFound.out | 0 .../cli/js/printArgumentsWithManyValue.args | 5 +++++ .../{ => js}/printArgumentsWithManyValue.out | 2 +- compiler/testData/cli/{ => js}/simple2js.args | 0 compiler/testData/cli/{ => js}/simple2js.kt | 0 compiler/testData/cli/{ => js}/simple2js.out | 0 .../cli/{ => js}/suppressAllWarningsJS.args | 2 +- .../cli/{ => js}/suppressAllWarningsJS.out | 0 .../cli/{ => jvm}/diagnosticsOrder.args | 0 .../cli/{ => jvm}/diagnosticsOrder.out | 0 .../cli/{ => jvm}/diagnosticsOrder1.kt | 0 .../cli/{ => jvm}/diagnosticsOrder2.kt | 0 .../testData/cli/{ => jvm}/hello.ktscript | 0 compiler/testData/cli/{ => jvm}/help.args | 0 compiler/testData/cli/{ => jvm}/help.out | 0 .../multipleTextRangesInDiagnosticsOrder.args | 0 .../multipleTextRangesInDiagnosticsOrder.kt | 0 .../multipleTextRangesInDiagnosticsOrder.out | 0 ...onExistingClassPathAndAnnotationsPath.args | 0 ...nonExistingClassPathAndAnnotationsPath.out | 0 .../cli/{ => jvm}/nonExistingSourcePath.args | 0 .../cli/{ => jvm}/nonExistingSourcePath.out | 0 .../cli/{ => jvm}/printArguments.args | 0 compiler/testData/cli/jvm/printArguments.out | 3 +++ compiler/testData/cli/{ => jvm}/script.args | 0 .../testData/cli/{ => jvm}/script.ktscript | 0 compiler/testData/cli/{ => jvm}/script.out | 0 compiler/testData/cli/{ => jvm}/simple.args | 0 compiler/testData/cli/{ => jvm}/simple.kt | 0 compiler/testData/cli/{ => jvm}/simple.out | 0 .../suppressAllWarningsLowercase.args | 2 +- .../suppressAllWarningsLowercase.out | 0 .../suppressAllWarningsMixedCase.args | 2 +- .../suppressAllWarningsMixedCase.out | 0 .../cli/{ => jvm}/wrongAbiVersion.args | 0 .../testData/cli/{ => jvm}/wrongAbiVersion.kt | 0 .../cli/{ => jvm}/wrongAbiVersion.out | 0 .../ClassWithWrongAbiVersion.class | Bin .../ClassWithWrongAbiVersion.kt.txt | 0 .../wrongAbiVersionLib/wrong-package.kt.txt | 0 ...ngPackage$src$wrong-package$f7694eb0.class | Bin .../wrong/WrongPackage.class | Bin .../testData/cli/{ => jvm}/wrongArgument.args | 0 .../testData/cli/{ => jvm}/wrongArgument.out | 0 .../cli/{ => jvm}/wrongKotlinSignature.args | 0 .../cli/{ => jvm}/wrongKotlinSignature.kt | 0 .../cli/{ => jvm}/wrongKotlinSignature.out | 0 .../ClassWithWrongKotlinSignatures.java | 0 compiler/testData/cli/printArguments.out | 3 --- .../cli/printArgumentsWithManyValue.args | 5 ----- .../jetbrains/jet/cli/jvm/CliBaseTest.java | 21 +++++++++--------- 54 files changed, 23 insertions(+), 22 deletions(-) rename compiler/testData/cli/{ => js}/outputPostfixFileNotFound.args (100%) rename compiler/testData/cli/{ => js}/outputPostfixFileNotFound.out (100%) rename compiler/testData/cli/{ => js}/outputPrefixFileNotFound.args (100%) rename compiler/testData/cli/{ => js}/outputPrefixFileNotFound.out (100%) create mode 100644 compiler/testData/cli/js/printArgumentsWithManyValue.args rename compiler/testData/cli/{ => js}/printArgumentsWithManyValue.out (72%) rename compiler/testData/cli/{ => js}/simple2js.args (100%) rename compiler/testData/cli/{ => js}/simple2js.kt (100%) rename compiler/testData/cli/{ => js}/simple2js.out (100%) rename compiler/testData/cli/{ => js}/suppressAllWarningsJS.args (65%) rename compiler/testData/cli/{ => js}/suppressAllWarningsJS.out (100%) rename compiler/testData/cli/{ => jvm}/diagnosticsOrder.args (100%) rename compiler/testData/cli/{ => jvm}/diagnosticsOrder.out (100%) rename compiler/testData/cli/{ => jvm}/diagnosticsOrder1.kt (100%) rename compiler/testData/cli/{ => jvm}/diagnosticsOrder2.kt (100%) rename compiler/testData/cli/{ => jvm}/hello.ktscript (100%) rename compiler/testData/cli/{ => jvm}/help.args (100%) rename compiler/testData/cli/{ => jvm}/help.out (100%) rename compiler/testData/cli/{ => jvm}/multipleTextRangesInDiagnosticsOrder.args (100%) rename compiler/testData/cli/{ => jvm}/multipleTextRangesInDiagnosticsOrder.kt (100%) rename compiler/testData/cli/{ => jvm}/multipleTextRangesInDiagnosticsOrder.out (100%) rename compiler/testData/cli/{ => jvm}/nonExistingClassPathAndAnnotationsPath.args (100%) rename compiler/testData/cli/{ => jvm}/nonExistingClassPathAndAnnotationsPath.out (100%) rename compiler/testData/cli/{ => jvm}/nonExistingSourcePath.args (100%) rename compiler/testData/cli/{ => jvm}/nonExistingSourcePath.out (100%) rename compiler/testData/cli/{ => jvm}/printArguments.args (100%) create mode 100644 compiler/testData/cli/jvm/printArguments.out rename compiler/testData/cli/{ => jvm}/script.args (100%) rename compiler/testData/cli/{ => jvm}/script.ktscript (100%) rename compiler/testData/cli/{ => jvm}/script.out (100%) rename compiler/testData/cli/{ => jvm}/simple.args (100%) rename compiler/testData/cli/{ => jvm}/simple.kt (100%) rename compiler/testData/cli/{ => jvm}/simple.out (100%) rename compiler/testData/cli/{ => jvm}/suppressAllWarningsLowercase.args (58%) rename compiler/testData/cli/{ => jvm}/suppressAllWarningsLowercase.out (100%) rename compiler/testData/cli/{ => jvm}/suppressAllWarningsMixedCase.args (58%) rename compiler/testData/cli/{ => jvm}/suppressAllWarningsMixedCase.out (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersion.args (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersion.kt (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersion.out (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersionLib/ClassWithWrongAbiVersion.class (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersionLib/ClassWithWrongAbiVersion.kt.txt (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersionLib/wrong-package.kt.txt (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersionLib/wrong/WrongPackage$src$wrong-package$f7694eb0.class (100%) rename compiler/testData/cli/{ => jvm}/wrongAbiVersionLib/wrong/WrongPackage.class (100%) rename compiler/testData/cli/{ => jvm}/wrongArgument.args (100%) rename compiler/testData/cli/{ => jvm}/wrongArgument.out (100%) rename compiler/testData/cli/{ => jvm}/wrongKotlinSignature.args (100%) rename compiler/testData/cli/{ => jvm}/wrongKotlinSignature.kt (100%) rename compiler/testData/cli/{ => jvm}/wrongKotlinSignature.out (100%) rename compiler/testData/cli/{ => jvm}/wrongKotlinSignatureLib/ClassWithWrongKotlinSignatures.java (100%) delete mode 100644 compiler/testData/cli/printArguments.out delete mode 100644 compiler/testData/cli/printArgumentsWithManyValue.args diff --git a/compiler/testData/cli/outputPostfixFileNotFound.args b/compiler/testData/cli/js/outputPostfixFileNotFound.args similarity index 100% rename from compiler/testData/cli/outputPostfixFileNotFound.args rename to compiler/testData/cli/js/outputPostfixFileNotFound.args diff --git a/compiler/testData/cli/outputPostfixFileNotFound.out b/compiler/testData/cli/js/outputPostfixFileNotFound.out similarity index 100% rename from compiler/testData/cli/outputPostfixFileNotFound.out rename to compiler/testData/cli/js/outputPostfixFileNotFound.out diff --git a/compiler/testData/cli/outputPrefixFileNotFound.args b/compiler/testData/cli/js/outputPrefixFileNotFound.args similarity index 100% rename from compiler/testData/cli/outputPrefixFileNotFound.args rename to compiler/testData/cli/js/outputPrefixFileNotFound.args diff --git a/compiler/testData/cli/outputPrefixFileNotFound.out b/compiler/testData/cli/js/outputPrefixFileNotFound.out similarity index 100% rename from compiler/testData/cli/outputPrefixFileNotFound.out rename to compiler/testData/cli/js/outputPrefixFileNotFound.out diff --git a/compiler/testData/cli/js/printArgumentsWithManyValue.args b/compiler/testData/cli/js/printArgumentsWithManyValue.args new file mode 100644 index 00000000000..279663f1d66 --- /dev/null +++ b/compiler/testData/cli/js/printArgumentsWithManyValue.args @@ -0,0 +1,5 @@ +-printArgs +-sourceFiles +$TESTDATA_DIR$/simple2js.kt,$TESTDATA_DIR$/../warnings.kt +-suppress +warnings \ No newline at end of file diff --git a/compiler/testData/cli/printArgumentsWithManyValue.out b/compiler/testData/cli/js/printArgumentsWithManyValue.out similarity index 72% rename from compiler/testData/cli/printArgumentsWithManyValue.out rename to compiler/testData/cli/js/printArgumentsWithManyValue.out index 90e2a190ea1..d3a95af24a1 100644 --- a/compiler/testData/cli/printArgumentsWithManyValue.out +++ b/compiler/testData/cli/js/printArgumentsWithManyValue.out @@ -1,3 +1,3 @@ -INFO: Invoking compiler org.jetbrains.jet.cli.js.K2JSCompiler with arguments -suppress warnings -printArgs -sourceFiles compiler/testData/cli/simple2js.kt,compiler/testData/cli/warnings.kt +INFO: Invoking compiler org.jetbrains.jet.cli.js.K2JSCompiler with arguments -suppress warnings -printArgs -sourceFiles compiler/testData/cli/js/simple2js.kt,compiler/testData/cli/js/../warnings.kt ERROR: Specify output file via -output COMPILATION_ERROR diff --git a/compiler/testData/cli/simple2js.args b/compiler/testData/cli/js/simple2js.args similarity index 100% rename from compiler/testData/cli/simple2js.args rename to compiler/testData/cli/js/simple2js.args diff --git a/compiler/testData/cli/simple2js.kt b/compiler/testData/cli/js/simple2js.kt similarity index 100% rename from compiler/testData/cli/simple2js.kt rename to compiler/testData/cli/js/simple2js.kt diff --git a/compiler/testData/cli/simple2js.out b/compiler/testData/cli/js/simple2js.out similarity index 100% rename from compiler/testData/cli/simple2js.out rename to compiler/testData/cli/js/simple2js.out diff --git a/compiler/testData/cli/suppressAllWarningsJS.args b/compiler/testData/cli/js/suppressAllWarningsJS.args similarity index 65% rename from compiler/testData/cli/suppressAllWarningsJS.args rename to compiler/testData/cli/js/suppressAllWarningsJS.args index 684763cee1a..73829cf76b0 100644 --- a/compiler/testData/cli/suppressAllWarningsJS.args +++ b/compiler/testData/cli/js/suppressAllWarningsJS.args @@ -1,5 +1,5 @@ -sourceFiles -$TESTDATA_DIR$/warnings.kt +$TESTDATA_DIR$/../warnings.kt -suppress WaRnInGs -output diff --git a/compiler/testData/cli/suppressAllWarningsJS.out b/compiler/testData/cli/js/suppressAllWarningsJS.out similarity index 100% rename from compiler/testData/cli/suppressAllWarningsJS.out rename to compiler/testData/cli/js/suppressAllWarningsJS.out diff --git a/compiler/testData/cli/diagnosticsOrder.args b/compiler/testData/cli/jvm/diagnosticsOrder.args similarity index 100% rename from compiler/testData/cli/diagnosticsOrder.args rename to compiler/testData/cli/jvm/diagnosticsOrder.args diff --git a/compiler/testData/cli/diagnosticsOrder.out b/compiler/testData/cli/jvm/diagnosticsOrder.out similarity index 100% rename from compiler/testData/cli/diagnosticsOrder.out rename to compiler/testData/cli/jvm/diagnosticsOrder.out diff --git a/compiler/testData/cli/diagnosticsOrder1.kt b/compiler/testData/cli/jvm/diagnosticsOrder1.kt similarity index 100% rename from compiler/testData/cli/diagnosticsOrder1.kt rename to compiler/testData/cli/jvm/diagnosticsOrder1.kt diff --git a/compiler/testData/cli/diagnosticsOrder2.kt b/compiler/testData/cli/jvm/diagnosticsOrder2.kt similarity index 100% rename from compiler/testData/cli/diagnosticsOrder2.kt rename to compiler/testData/cli/jvm/diagnosticsOrder2.kt diff --git a/compiler/testData/cli/hello.ktscript b/compiler/testData/cli/jvm/hello.ktscript similarity index 100% rename from compiler/testData/cli/hello.ktscript rename to compiler/testData/cli/jvm/hello.ktscript diff --git a/compiler/testData/cli/help.args b/compiler/testData/cli/jvm/help.args similarity index 100% rename from compiler/testData/cli/help.args rename to compiler/testData/cli/jvm/help.args diff --git a/compiler/testData/cli/help.out b/compiler/testData/cli/jvm/help.out similarity index 100% rename from compiler/testData/cli/help.out rename to compiler/testData/cli/jvm/help.out diff --git a/compiler/testData/cli/multipleTextRangesInDiagnosticsOrder.args b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.args similarity index 100% rename from compiler/testData/cli/multipleTextRangesInDiagnosticsOrder.args rename to compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.args diff --git a/compiler/testData/cli/multipleTextRangesInDiagnosticsOrder.kt b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt similarity index 100% rename from compiler/testData/cli/multipleTextRangesInDiagnosticsOrder.kt rename to compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt diff --git a/compiler/testData/cli/multipleTextRangesInDiagnosticsOrder.out b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out similarity index 100% rename from compiler/testData/cli/multipleTextRangesInDiagnosticsOrder.out rename to compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out diff --git a/compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.args b/compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.args similarity index 100% rename from compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.args rename to compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.args diff --git a/compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.out b/compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.out similarity index 100% rename from compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.out rename to compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.out diff --git a/compiler/testData/cli/nonExistingSourcePath.args b/compiler/testData/cli/jvm/nonExistingSourcePath.args similarity index 100% rename from compiler/testData/cli/nonExistingSourcePath.args rename to compiler/testData/cli/jvm/nonExistingSourcePath.args diff --git a/compiler/testData/cli/nonExistingSourcePath.out b/compiler/testData/cli/jvm/nonExistingSourcePath.out similarity index 100% rename from compiler/testData/cli/nonExistingSourcePath.out rename to compiler/testData/cli/jvm/nonExistingSourcePath.out diff --git a/compiler/testData/cli/printArguments.args b/compiler/testData/cli/jvm/printArguments.args similarity index 100% rename from compiler/testData/cli/printArguments.args rename to compiler/testData/cli/jvm/printArguments.args diff --git a/compiler/testData/cli/jvm/printArguments.out b/compiler/testData/cli/jvm/printArguments.out new file mode 100644 index 00000000000..19331bb7737 --- /dev/null +++ b/compiler/testData/cli/jvm/printArguments.out @@ -0,0 +1,3 @@ +INFO: Invoking compiler org.jetbrains.jet.cli.jvm.K2JVMCompiler with arguments -printArgs -script compiler/testData/cli/jvm/hello.ktscript +hello +OK diff --git a/compiler/testData/cli/script.args b/compiler/testData/cli/jvm/script.args similarity index 100% rename from compiler/testData/cli/script.args rename to compiler/testData/cli/jvm/script.args diff --git a/compiler/testData/cli/script.ktscript b/compiler/testData/cli/jvm/script.ktscript similarity index 100% rename from compiler/testData/cli/script.ktscript rename to compiler/testData/cli/jvm/script.ktscript diff --git a/compiler/testData/cli/script.out b/compiler/testData/cli/jvm/script.out similarity index 100% rename from compiler/testData/cli/script.out rename to compiler/testData/cli/jvm/script.out diff --git a/compiler/testData/cli/simple.args b/compiler/testData/cli/jvm/simple.args similarity index 100% rename from compiler/testData/cli/simple.args rename to compiler/testData/cli/jvm/simple.args diff --git a/compiler/testData/cli/simple.kt b/compiler/testData/cli/jvm/simple.kt similarity index 100% rename from compiler/testData/cli/simple.kt rename to compiler/testData/cli/jvm/simple.kt diff --git a/compiler/testData/cli/simple.out b/compiler/testData/cli/jvm/simple.out similarity index 100% rename from compiler/testData/cli/simple.out rename to compiler/testData/cli/jvm/simple.out diff --git a/compiler/testData/cli/suppressAllWarningsLowercase.args b/compiler/testData/cli/jvm/suppressAllWarningsLowercase.args similarity index 58% rename from compiler/testData/cli/suppressAllWarningsLowercase.args rename to compiler/testData/cli/jvm/suppressAllWarningsLowercase.args index 733cede08a6..3f9f9353aff 100644 --- a/compiler/testData/cli/suppressAllWarningsLowercase.args +++ b/compiler/testData/cli/jvm/suppressAllWarningsLowercase.args @@ -1,5 +1,5 @@ -src -$TESTDATA_DIR$/warnings.kt +$TESTDATA_DIR$/../warnings.kt -suppress warnings -output diff --git a/compiler/testData/cli/suppressAllWarningsLowercase.out b/compiler/testData/cli/jvm/suppressAllWarningsLowercase.out similarity index 100% rename from compiler/testData/cli/suppressAllWarningsLowercase.out rename to compiler/testData/cli/jvm/suppressAllWarningsLowercase.out diff --git a/compiler/testData/cli/suppressAllWarningsMixedCase.args b/compiler/testData/cli/jvm/suppressAllWarningsMixedCase.args similarity index 58% rename from compiler/testData/cli/suppressAllWarningsMixedCase.args rename to compiler/testData/cli/jvm/suppressAllWarningsMixedCase.args index 0bc9cfe26db..072c0c29cf5 100644 --- a/compiler/testData/cli/suppressAllWarningsMixedCase.args +++ b/compiler/testData/cli/jvm/suppressAllWarningsMixedCase.args @@ -1,5 +1,5 @@ -src -$TESTDATA_DIR$/warnings.kt +$TESTDATA_DIR$/../warnings.kt -suppress WaRnInGs -output diff --git a/compiler/testData/cli/suppressAllWarningsMixedCase.out b/compiler/testData/cli/jvm/suppressAllWarningsMixedCase.out similarity index 100% rename from compiler/testData/cli/suppressAllWarningsMixedCase.out rename to compiler/testData/cli/jvm/suppressAllWarningsMixedCase.out diff --git a/compiler/testData/cli/wrongAbiVersion.args b/compiler/testData/cli/jvm/wrongAbiVersion.args similarity index 100% rename from compiler/testData/cli/wrongAbiVersion.args rename to compiler/testData/cli/jvm/wrongAbiVersion.args diff --git a/compiler/testData/cli/wrongAbiVersion.kt b/compiler/testData/cli/jvm/wrongAbiVersion.kt similarity index 100% rename from compiler/testData/cli/wrongAbiVersion.kt rename to compiler/testData/cli/jvm/wrongAbiVersion.kt diff --git a/compiler/testData/cli/wrongAbiVersion.out b/compiler/testData/cli/jvm/wrongAbiVersion.out similarity index 100% rename from compiler/testData/cli/wrongAbiVersion.out rename to compiler/testData/cli/jvm/wrongAbiVersion.out diff --git a/compiler/testData/cli/wrongAbiVersionLib/ClassWithWrongAbiVersion.class b/compiler/testData/cli/jvm/wrongAbiVersionLib/ClassWithWrongAbiVersion.class similarity index 100% rename from compiler/testData/cli/wrongAbiVersionLib/ClassWithWrongAbiVersion.class rename to compiler/testData/cli/jvm/wrongAbiVersionLib/ClassWithWrongAbiVersion.class diff --git a/compiler/testData/cli/wrongAbiVersionLib/ClassWithWrongAbiVersion.kt.txt b/compiler/testData/cli/jvm/wrongAbiVersionLib/ClassWithWrongAbiVersion.kt.txt similarity index 100% rename from compiler/testData/cli/wrongAbiVersionLib/ClassWithWrongAbiVersion.kt.txt rename to compiler/testData/cli/jvm/wrongAbiVersionLib/ClassWithWrongAbiVersion.kt.txt diff --git a/compiler/testData/cli/wrongAbiVersionLib/wrong-package.kt.txt b/compiler/testData/cli/jvm/wrongAbiVersionLib/wrong-package.kt.txt similarity index 100% rename from compiler/testData/cli/wrongAbiVersionLib/wrong-package.kt.txt rename to compiler/testData/cli/jvm/wrongAbiVersionLib/wrong-package.kt.txt diff --git a/compiler/testData/cli/wrongAbiVersionLib/wrong/WrongPackage$src$wrong-package$f7694eb0.class b/compiler/testData/cli/jvm/wrongAbiVersionLib/wrong/WrongPackage$src$wrong-package$f7694eb0.class similarity index 100% rename from compiler/testData/cli/wrongAbiVersionLib/wrong/WrongPackage$src$wrong-package$f7694eb0.class rename to compiler/testData/cli/jvm/wrongAbiVersionLib/wrong/WrongPackage$src$wrong-package$f7694eb0.class diff --git a/compiler/testData/cli/wrongAbiVersionLib/wrong/WrongPackage.class b/compiler/testData/cli/jvm/wrongAbiVersionLib/wrong/WrongPackage.class similarity index 100% rename from compiler/testData/cli/wrongAbiVersionLib/wrong/WrongPackage.class rename to compiler/testData/cli/jvm/wrongAbiVersionLib/wrong/WrongPackage.class diff --git a/compiler/testData/cli/wrongArgument.args b/compiler/testData/cli/jvm/wrongArgument.args similarity index 100% rename from compiler/testData/cli/wrongArgument.args rename to compiler/testData/cli/jvm/wrongArgument.args diff --git a/compiler/testData/cli/wrongArgument.out b/compiler/testData/cli/jvm/wrongArgument.out similarity index 100% rename from compiler/testData/cli/wrongArgument.out rename to compiler/testData/cli/jvm/wrongArgument.out diff --git a/compiler/testData/cli/wrongKotlinSignature.args b/compiler/testData/cli/jvm/wrongKotlinSignature.args similarity index 100% rename from compiler/testData/cli/wrongKotlinSignature.args rename to compiler/testData/cli/jvm/wrongKotlinSignature.args diff --git a/compiler/testData/cli/wrongKotlinSignature.kt b/compiler/testData/cli/jvm/wrongKotlinSignature.kt similarity index 100% rename from compiler/testData/cli/wrongKotlinSignature.kt rename to compiler/testData/cli/jvm/wrongKotlinSignature.kt diff --git a/compiler/testData/cli/wrongKotlinSignature.out b/compiler/testData/cli/jvm/wrongKotlinSignature.out similarity index 100% rename from compiler/testData/cli/wrongKotlinSignature.out rename to compiler/testData/cli/jvm/wrongKotlinSignature.out diff --git a/compiler/testData/cli/wrongKotlinSignatureLib/ClassWithWrongKotlinSignatures.java b/compiler/testData/cli/jvm/wrongKotlinSignatureLib/ClassWithWrongKotlinSignatures.java similarity index 100% rename from compiler/testData/cli/wrongKotlinSignatureLib/ClassWithWrongKotlinSignatures.java rename to compiler/testData/cli/jvm/wrongKotlinSignatureLib/ClassWithWrongKotlinSignatures.java diff --git a/compiler/testData/cli/printArguments.out b/compiler/testData/cli/printArguments.out deleted file mode 100644 index 7359c159a83..00000000000 --- a/compiler/testData/cli/printArguments.out +++ /dev/null @@ -1,3 +0,0 @@ -INFO: Invoking compiler org.jetbrains.jet.cli.jvm.K2JVMCompiler with arguments -printArgs -script compiler/testData/cli/hello.ktscript -hello -OK diff --git a/compiler/testData/cli/printArgumentsWithManyValue.args b/compiler/testData/cli/printArgumentsWithManyValue.args deleted file mode 100644 index 8eb693c988b..00000000000 --- a/compiler/testData/cli/printArgumentsWithManyValue.args +++ /dev/null @@ -1,5 +0,0 @@ --printArgs --sourceFiles -$TESTDATA_DIR$/simple2js.kt,$TESTDATA_DIR$/warnings.kt --suppress -warnings \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/cli/jvm/CliBaseTest.java b/compiler/tests/org/jetbrains/jet/cli/jvm/CliBaseTest.java index c04a28f8b70..d6fe425fe58 100644 --- a/compiler/tests/org/jetbrains/jet/cli/jvm/CliBaseTest.java +++ b/compiler/tests/org/jetbrains/jet/cli/jvm/CliBaseTest.java @@ -37,7 +37,8 @@ import java.io.PrintStream; import java.util.List; public class CliBaseTest { - private static final String TEST_DATA_HOME = "compiler/testData/cli"; + private static final String JS_TEST_DATA = "compiler/testData/cli/js"; + private static final String JVM_TEST_DATA = "compiler/testData/cli/jvm"; @Rule public final Tmpdir tmpdir = new Tmpdir(); @@ -61,16 +62,16 @@ public class CliBaseTest { } } - private void executeCompilerCompareOutput(@NotNull CLICompiler compiler) throws Exception { - String actual = executeCompilerGrabOutput(compiler, readArgs()) - .replace(new File(TEST_DATA_HOME).getAbsolutePath(), "$TESTDATA_DIR$") + private void executeCompilerCompareOutput(@NotNull CLICompiler compiler, @NotNull String testDataDir) throws Exception { + String actual = executeCompilerGrabOutput(compiler, readArgs(testDataDir)) + .replace(new File(testDataDir).getAbsolutePath(), "$TESTDATA_DIR$") .replace("\\", "/"); - JetTestUtils.assertEqualsToFile(new File(TEST_DATA_HOME + "/" + testName.getMethodName() + ".out"), actual); + JetTestUtils.assertEqualsToFile(new File(testDataDir + "/" + testName.getMethodName() + ".out"), actual); } - private String[] readArgs() throws IOException { - List lines = FileUtil.loadLines(TEST_DATA_HOME + "/" + testName.getMethodName() + ".args"); + private String[] readArgs(@NotNull final String testDataDir) throws IOException { + List lines = FileUtil.loadLines(testDataDir + "/" + testName.getMethodName() + ".args"); return ArrayUtil.toStringArray(ContainerUtil.mapNotNull(lines, new Function() { @Override @@ -81,16 +82,16 @@ public class CliBaseTest { return arg .replace(":", File.pathSeparator) .replace("$TEMP_DIR$", tmpdir.getTmpDir().getPath()) - .replace("$TESTDATA_DIR$", TEST_DATA_HOME); + .replace("$TESTDATA_DIR$", testDataDir); } })); } protected void executeCompilerCompareOutputJVM() throws Exception { - executeCompilerCompareOutput(new K2JVMCompiler()); + executeCompilerCompareOutput(new K2JVMCompiler(), JVM_TEST_DATA); } protected void executeCompilerCompareOutputJS() throws Exception { - executeCompilerCompareOutput(new K2JSCompiler()); + executeCompilerCompareOutput(new K2JSCompiler(), JS_TEST_DATA); } }