diff --git a/compiler/integration-tests/data/antTaskJvm/build.log.expected b/compiler/integration-tests/data/antTaskJvm/build.log.expected index 6dd594e38f9..5e63dc27348 100644 --- a/compiler/integration-tests/data/antTaskJvm/build.log.expected +++ b/compiler/integration-tests/data/antTaskJvm/build.log.expected @@ -2,8 +2,10 @@ OUT Buildfile: build.xml OUT OUT build: OUT [kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar] -OUT [kotlinc] LOGGING: Emitting: Hello/namespace.class -OUT [kotlinc] LOGGING: For source: [TestData]/hello.kt +OUT [kotlinc] OUTPUT: Output: +OUT [kotlinc] Hello/namespace.class +OUT [kotlinc] Sources: +OUT [kotlinc] [TestData]/hello.kt OUT OUT BUILD SUCCESSFUL OUT Total time: [time] diff --git a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/JetCompilerMessagingTest.java b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/JetCompilerMessagingTest.java index 0394d11d69a..00b707b9c31 100644 --- a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/JetCompilerMessagingTest.java +++ b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/JetCompilerMessagingTest.java @@ -73,5 +73,6 @@ public final class JetCompilerMessagingTest extends IDECompilerMessagingTest { checker.expect(Message.info().textStartsWith("Using kotlinHome=")); checker.expect(Message.info().textStartsWith("Invoking in-process compiler")); checker.expect(Message.info().textStartsWith("Kotlin Compiler version")); + checker.expect(Message.stats().text("Configuring the compilation environment")); } } diff --git a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/K2JSCompilerMessagingTest.java b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/K2JSCompilerMessagingTest.java index cb53b4f1777..f8bb3f74701 100644 --- a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/K2JSCompilerMessagingTest.java +++ b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/K2JSCompilerMessagingTest.java @@ -23,6 +23,7 @@ import org.jetbrains.jet.plugin.compiler.K2JSCompiler; import org.jetbrains.jet.plugin.project.K2JSModuleComponent; import static org.jetbrains.jet.plugin.compilerMessages.Message.error; +import static org.jetbrains.jet.plugin.compilerMessages.Message.stats; import static org.jetbrains.jet.plugin.compilerMessages.Message.warning; /** @@ -84,5 +85,6 @@ public final class K2JSCompilerMessagingTest extends IDECompilerMessagingTest { @Override protected void checkHeader(@NotNull MessageChecker checker) { checker.expect(Message.info().textStartsWith("Kotlin Compiler version")); + checker.expect(stats().textMatchesRegexp("Compiling source files: .*/src/test.kt")); } } diff --git a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/Message.java b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/Message.java index e83496fe9f2..9e66f347b2c 100644 --- a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/Message.java +++ b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/Message.java @@ -42,6 +42,11 @@ public final class Message { return new Message(CompilerMessageCategory.INFORMATION); } + @NotNull + public static Message stats() { + return new Message(CompilerMessageCategory.STATISTICS); + } + @NotNull public CompilerMessageCategory category; @Nullable @@ -50,6 +55,8 @@ public final class Message { public String message = null; @Nullable public String textStartsWith = null; + @Nullable + private String textMatchesRegexp = null; public int column = -1; public int line = -1; @@ -80,6 +87,11 @@ public final class Message { return this; } + public Message textMatchesRegexp(String regexp) { + this.textMatchesRegexp = regexp; + return this; + } + public void check(@NotNull Message other) { checkMessages(other); Assert.assertEquals(other.category, this.category); @@ -96,6 +108,11 @@ public final class Message { other.message.startsWith(textStartsWith)); return; } + if (textMatchesRegexp != null) { + Assert.assertTrue("Message should match regexp:\n" + textMatchesRegexp + "\nBut it is:\n" + other.message, + other.message.matches(textMatchesRegexp)); + return; + } Assert.assertEquals(other.message, this.message); } diff --git a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/MessageChecker.java b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/MessageChecker.java index 43803af4f4e..c55439b2d14 100644 --- a/idea/tests/org/jetbrains/jet/plugin/compilerMessages/MessageChecker.java +++ b/idea/tests/org/jetbrains/jet/plugin/compilerMessages/MessageChecker.java @@ -36,7 +36,7 @@ public final class MessageChecker { @NotNull public MessageChecker expect(@NotNull Message message) { - assertTrue("More messages expected:\n" + message.message, iterator.hasNext()); + assertTrue("Expected message not present:\n" + message, iterator.hasNext()); message.check(iterator.next()); return this; }