From 3629a539e431038d17943237623d84010cecc1c1 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 5 Dec 2013 11:42:36 +0400 Subject: [PATCH] Smoke test data fixed --- .../compilationFailed/hello.compile.expected | 1 - .../unusedExpressionSimpleName.instructions | 18 ++++++++++++++++++ .../testData/cfg/unusedExpressionSimpleName.kt | 5 +++++ .../jet/cfg/ControlFlowTestGenerated.java | 12 ++++++++++-- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 compiler/testData/cfg/unusedExpressionSimpleName.instructions create mode 100644 compiler/testData/cfg/unusedExpressionSimpleName.kt diff --git a/compiler/integration-tests/testData/compilationFailed/hello.compile.expected b/compiler/integration-tests/testData/compilationFailed/hello.compile.expected index 4b0d95cb23a..9b29ffd47d5 100644 --- a/compiler/integration-tests/testData/compilationFailed/hello.compile.expected +++ b/compiler/integration-tests/testData/compilationFailed/hello.compile.expected @@ -1,4 +1,3 @@ OUT ERROR: [TestData]/hello.kt: (4, 5) Unresolved reference: a -OUT WARNING: [TestData]/hello.kt: (4, 5) The expression is unused ERR exec() finished with COMPILATION_ERROR return code Return code: 1 diff --git a/compiler/testData/cfg/unusedExpressionSimpleName.instructions b/compiler/testData/cfg/unusedExpressionSimpleName.instructions new file mode 100644 index 00000000000..57fd0a0f70e --- /dev/null +++ b/compiler/testData/cfg/unusedExpressionSimpleName.instructions @@ -0,0 +1,18 @@ +== main == +fun main(arg : Array) { + a +} +--------------------- +L0: + + v(arg : Array) + w(arg) + mark({ a }) + error(a, No resolved call) +L1: + NEXT:[] +error: + PREV:[] +sink: + PREV:[, ] +===================== diff --git a/compiler/testData/cfg/unusedExpressionSimpleName.kt b/compiler/testData/cfg/unusedExpressionSimpleName.kt new file mode 100644 index 00000000000..31117210271 --- /dev/null +++ b/compiler/testData/cfg/unusedExpressionSimpleName.kt @@ -0,0 +1,5 @@ +package Hello + +fun main(arg : Array) { + a +} diff --git a/compiler/tests/org/jetbrains/jet/cfg/ControlFlowTestGenerated.java b/compiler/tests/org/jetbrains/jet/cfg/ControlFlowTestGenerated.java index 9770e5227aa..7d1c4ea9293 100644 --- a/compiler/tests/org/jetbrains/jet/cfg/ControlFlowTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/cfg/ControlFlowTestGenerated.java @@ -16,14 +16,17 @@ package org.jetbrains.jet.cfg; +import junit.framework.Assert; import junit.framework.Test; import junit.framework.TestSuite; + +import java.io.File; +import java.util.regex.Pattern; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.test.InnerTestClasses; import org.jetbrains.jet.test.TestMetadata; -import java.io.File; -import java.util.regex.Pattern; +import org.jetbrains.jet.cfg.AbstractControlFlowTest; /** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @@ -209,6 +212,11 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { doTest("compiler/testData/cfg/unresolved.kt"); } + @TestMetadata("unusedExpressionSimpleName.kt") + public void testUnusedExpressionSimpleName() throws Exception { + doTest("compiler/testData/cfg/unusedExpressionSimpleName.kt"); + } + @TestMetadata("unusedFunctionLiteral.kt") public void testUnusedFunctionLiteral() throws Exception { doTest("compiler/testData/cfg/unusedFunctionLiteral.kt");