Author: nbubna
Date: Thu Oct 16 10:58:06 2008
New Revision: 705293
URL: http://svn.apache.org/viewvc?rev=705293&view=rev
Log:
simplify
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity627TestCase.java
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity627TestCase.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity627TestCase.java?rev=705293&r1=705292&r2=705293&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity627TestCase.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity627TestCase.java
Thu Oct 16 10:58:06 2008
@@ -42,15 +42,9 @@
public void test627()
{
- try
- {
- evaluate("##\n##\n#foreach($i in \"junk\")blaa#end");
- }
- catch(RuntimeException e)
- {
- // Make sure the error ouput contains "line 3" if not throw
- if (e.getMessage().indexOf("[line 3, column") == -1)
- throw e;
- }
+ Exception e = assertEvalException("##\n##\n#foreach($i in
\"junk\")blaa#end");
+ System.out.println("e :: " + e.getMessage());
+ // Make sure the error ouput contains "line 3" if not throw
+ assertTrue(e.getMessage().indexOf("[line 3, column 16]") == -1);
}
}