ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/util/regexp RegexpMatcherTest.java
Date Mon, 05 Nov 2001 07:15:20 GMT
bodewig     01/11/04 23:15:19

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTestRunnerTest.java
               src/testcases/org/apache/tools/ant/util/regexp
                        RegexpMatcherTest.java
  Log:
  assert -> assertTrue in two testcases I had missed.
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
  
  Index: JUnitTestRunnerTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JUnitTestRunnerTest.java	2001/07/11 10:08:20	1.1
  +++ JUnitTestRunnerTest.java	2001/11/05 07:15:19	1.2
  @@ -90,7 +90,7 @@
           runner.run();
           String error = runner.getFormatter().getError();
           assertEquals(error, JUnitTestRunner.ERRORS, runner.getRetCode());
  -        assert(error, error.indexOf("thrown on purpose") != -1);
  +        assertTrue(error, error.indexOf("thrown on purpose") != -1);
       }
   
       // check that something which is not a testcase generates no errors
  @@ -108,7 +108,7 @@
           String error = runner.getFormatter().getError();
           assertEquals(error, JUnitTestRunner.FAILURES, runner.getRetCode());
           //@fixme as of now does not report the original stacktrace.
  -        //assert(error, error.indexOf("thrown on purpose") != -1);
  +        //assertTrue(error, error.indexOf("thrown on purpose") != -1);
       }
       
       protected TestRunner createRunner(Class clazz){
  
  
  
  1.6       +12 -12    jakarta-ant/src/testcases/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
  
  Index: RegexpMatcherTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RegexpMatcherTest.java	2001/10/26 09:36:40	1.5
  +++ RegexpMatcherTest.java	2001/11/05 07:15:19	1.6
  @@ -156,37 +156,37 @@
   
       protected void doStartTest1(String text) {
           reg.setPattern("^starttest");
  -        assert("^starttest in default mode", !reg.matches(text));
  -        assert("^starttest in single line mode", 
  +        assertTrue("^starttest in default mode", !reg.matches(text));
  +        assertTrue("^starttest in single line mode", 
                  !reg.matches(text, RegexpMatcher.MATCH_SINGLELINE));
  -        assert("^starttest in multi line mode", 
  +        assertTrue("^starttest in multi line mode", 
                  reg.matches(text, RegexpMatcher.MATCH_MULTILINE));
       }
   
       protected void doStartTest2(String text) {
           reg.setPattern("^Line1");
  -        assert("^Line1 in default mode", reg.matches(text));
  -        assert("^Line1 in single line mode", 
  +        assertTrue("^Line1 in default mode", reg.matches(text));
  +        assertTrue("^Line1 in single line mode", 
                  reg.matches(text, RegexpMatcher.MATCH_SINGLELINE));
  -        assert("^Line1 in multi line mode", 
  +        assertTrue("^Line1 in multi line mode", 
                  reg.matches(text, RegexpMatcher.MATCH_MULTILINE));
       }
   
       protected void doEndTest1(String text) {
           reg.setPattern("endtest$");
  -        assert("endtest$ in default mode", !reg.matches(text));
  -        assert("endtest$ in single line mode", 
  +        assertTrue("endtest$ in default mode", !reg.matches(text));
  +        assertTrue("endtest$ in single line mode", 
                  !reg.matches(text, RegexpMatcher.MATCH_SINGLELINE));
  -        assert("endtest$ in multi line mode", 
  +        assertTrue("endtest$ in multi line mode", 
                  reg.matches(text, RegexpMatcher.MATCH_MULTILINE));
       }
   
       protected void doEndTest2(String text) {
           reg.setPattern("Line4$");
  -        assert("Line4$ in default mode", reg.matches(text));
  -        assert("Line4$ in single line mode", 
  +        assertTrue("Line4$ in default mode", reg.matches(text));
  +        assertTrue("Line4$ in single line mode", 
                  reg.matches(text, RegexpMatcher.MATCH_SINGLELINE));
  -        assert("Line4$ in multi line mode", 
  +        assertTrue("Line4$ in multi line mode", 
                  reg.matches(text, RegexpMatcher.MATCH_MULTILINE));
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message