From 9fff4dfc413e3ef40f05bd6b779fccc40d9eae84 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 8 Aug 2007 03:55:41 +0000 Subject: [PATCH] re-add single-arg signature of assertLogContaining, allows JDependTest to compile git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@563734 13f79535-47bb-0310-9956-ffa450edef68 --- .../junit/org/apache/tools/ant/BuildFileTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/junit/org/apache/tools/ant/BuildFileTest.java b/src/tests/junit/org/apache/tools/ant/BuildFileTest.java index 2273826fc..3e84fd464 100644 --- a/src/tests/junit/org/apache/tools/ant/BuildFileTest.java +++ b/src/tests/junit/org/apache/tools/ant/BuildFileTest.java @@ -115,6 +115,14 @@ public abstract class BuildFileTest extends TestCase { realLog.indexOf(substring) >= 0); } + /** + * Assert that the given substring is in the output messages. + * @since Ant1.7 + */ + public void assertOutputContaining(String substring) { + assertOutputContaining(null, substring); + } + /** * Assert that the given substring is in the output messages. * @param message Print this message if the test fails. Defaults to @@ -139,7 +147,7 @@ public abstract class BuildFileTest extends TestCase { String realOutput = getOutput(); String realMessage = (message != null) ? message - : "expecting output to contain \"" + substring + "\" output was \"" + realOutput + "\""; + : "expecting output to not contain \"" + substring + "\" output was \"" + realOutput + "\""; assertFalse(realMessage, realOutput.indexOf(substring) >= 0); }