Browse Source

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
master
Stefan Bodewig 18 years ago
parent
commit
9fff4dfc41
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/tests/junit/org/apache/tools/ant/BuildFileTest.java

+ 9
- 1
src/tests/junit/org/apache/tools/ant/BuildFileTest.java View File

@@ -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);
}



Loading…
Cancel
Save