You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2005/08/13 09:34:48 UTC
svn commit: r232436 -
/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/util/location/LocationTestCase.java
Author: sylvain
Date: Sat Aug 13 00:34:40 2005
New Revision: 232436
URL: http://svn.apache.org/viewcvs?rev=232436&view=rev
Log:
Forgot to commit updated test case...
Modified:
cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/util/location/LocationTestCase.java
Modified: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/util/location/LocationTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/util/location/LocationTestCase.java?rev=232436&r1=232435&r2=232436&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/util/location/LocationTestCase.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/util/location/LocationTestCase.java Sat Aug 13 00:34:40 2005
@@ -31,18 +31,19 @@
static final String str = "path/to/file.xml:1:40";
public void testParse() throws Exception {
- String str = "path/to/file.xml:1:40";
- Location loc = Location.parse(str);
+ String str = "<map:generate> - path/to/file.xml:1:40";
+ Location loc = LocationImpl.valueOf(str);
+ assertEquals("<map:generate>", loc.getDescription());
assertEquals("URI", "path/to/file.xml", loc.getURI());
- assertEquals("line", 1, loc.getLine());
- assertEquals("column", 40, loc.getColumn());
+ assertEquals("line", 1, loc.getLineNumber());
+ assertEquals("column", 40, loc.getColumnNumber());
assertEquals("string representation", str, loc.toString());
}
public void testEquals() throws Exception {
- Location loc1 = Location.parse(str);
- Location loc2 = new Location("path/to/file.xml", 1, 40);
+ Location loc1 = LocationImpl.valueOf(str);
+ Location loc2 = new LocationImpl(null, "path/to/file.xml", 1, 40);
assertEquals("locations", loc1, loc2);
assertEquals("hashcode", loc1.hashCode(), loc2.hashCode());