From 9c3b8484b913ca11b909bd96740cc210a6b65464 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 4 Aug 2020 09:36:37 +0300 Subject: [PATCH] [FIR TEST] Add CLI test with should-be-error (not yet) --- compiler/testData/cli/jvm/firError.args | 4 ++++ compiler/testData/cli/jvm/firError.kt | 6 ++++++ compiler/testData/cli/jvm/firError.out | 1 + .../tests/org/jetbrains/kotlin/cli/CliTestGenerated.java | 5 +++++ 4 files changed, 16 insertions(+) create mode 100644 compiler/testData/cli/jvm/firError.args create mode 100644 compiler/testData/cli/jvm/firError.kt create mode 100644 compiler/testData/cli/jvm/firError.out diff --git a/compiler/testData/cli/jvm/firError.args b/compiler/testData/cli/jvm/firError.args new file mode 100644 index 00000000000..b996f1faecc --- /dev/null +++ b/compiler/testData/cli/jvm/firError.args @@ -0,0 +1,4 @@ +$TESTDATA_DIR$/firError.kt +-Xuse-fir +-d +$TEMP_DIR$ diff --git a/compiler/testData/cli/jvm/firError.kt b/compiler/testData/cli/jvm/firError.kt new file mode 100644 index 00000000000..1db83d80401 --- /dev/null +++ b/compiler/testData/cli/jvm/firError.kt @@ -0,0 +1,6 @@ +fun println(val x: Int) {} + +fun main() { + val x: Int + println(x) +} \ No newline at end of file diff --git a/compiler/testData/cli/jvm/firError.out b/compiler/testData/cli/jvm/firError.out new file mode 100644 index 00000000000..d86bac9de59 --- /dev/null +++ b/compiler/testData/cli/jvm/firError.out @@ -0,0 +1 @@ +OK diff --git a/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java index 91679f77bf9..31461c65ea9 100644 --- a/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java @@ -275,6 +275,11 @@ public class CliTestGenerated extends AbstractCliTest { runTest("compiler/testData/cli/jvm/fileClassClashMultipleFiles.args"); } + @TestMetadata("firError.args") + public void testFirError() throws Exception { + runTest("compiler/testData/cli/jvm/firError.args"); + } + @TestMetadata("firHello.args") public void testFirHello() throws Exception { runTest("compiler/testData/cli/jvm/firHello.args");