Here are the JUnit tests achieved at the lowest level of the engine. They ensure
that the basic features on which relies all the machinery are working correctly.
At this time, few JUnit tests have been written. The test suite will grow as
one goes along. The current policy is to create some test cases for every
new feature and enhancement introduced in RefleX and for
every bug corrected : every new test must be done with JUnit or XUnit.
Note that the summary below is not those built by Ant.
| Test name | Tests | Errors | Failure |
|---|
| Summary of JUnit tests for RefleX | 119 | 5 | 1 |
| 1/38 | org.inria.ns.reflex.jtests.catalog.LookupTest | 1 | 0 | 0 |
BEGIN
urn:acme:foo.exp---1.0
urn:acme:foo.exp---1.1
END
BEGIN
|
| 2/38 | org.inria.ns.reflex.jtests.catalog.RawCatalogConversionTest | 1 | 0 | 0 |
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml"
BASE "file:///path/to/resources/"
PUBLIC "-//USA/AAP//DTD BK-1//EN" "aapbook.dtd"
PUBLIC "-//ACME//DTD Report//EN" "http://acme.com/dtds/report.dtd"
ENTITY "chips" "graphics\chips.tif"
<?xml version="1.0" encoding="UTF-8"?><cat:catalog xmlns:cat="http://ns.inria.org/active-catalog"><cat:public public-id="ISO 8879-1986//ENTITIES Added Latin 1//EN" uri="iso-lat1.gml"/><cat:public public-id="-//USA/AAP//DTD BK-1//EN" uri="aapbook.dtd" xml:base="file:///path/to/resources/"/><cat:public public-id="-//ACME//DTD Report//EN" uri="http://acme.com/dtds/report.dtd" xml:base="file:///path/to/resources/"/></cat:catalog>
|
| 3/38 | org.inria.ns.reflex.jtests.dom.DOMTest | 3 | 0 | 0 |
======> Test DOM navigation (physical structure)
Titre
auteur
Description
Ce test met en œuvre
le DOM & XPath
dans
extMarkupLanguage
.
======> Test XPath navigation in DOM (logical structure)
Titre
Auteur
Description
Ce test met en œuvre le DOM & XPath dans XML.
|
| 4/38 | org.inria.ns.reflex.jtests.html.NekoTest | 3 | 1 | 0 |
| Name | testHtml | | Message | expected:<... <head> <title>Welcome</title> </head> <body> <h1 class="title">Welcome !</h1> <p>Hello.</p> </body> ...> but was:<...<head> <title>Welcome</title> </head><body> <h1 class="title">Welcome !</h1> <p>Hello.</p> </body>...> | | Type | junit.framework.ComparisonFailure | | failure | junit.framework.ComparisonFailure: expected:<...
<head>
<title>Welcome</title>
</head>
<body>
<h1 class="title">Welcome !</h1>
<p>Hello.</p>
</body>
...> but was:<...<head>
<title>Welcome</title>
</head><body>
<h1 class="title">Welcome !</h1>
<p>Hello.</p>
</body>...>
at org.inria.ns.reflex.jtests.html.NekoTest.testHtml(NekoTest.java:62)
|
|
--- TEST HTML
class org.inria.ns.reflex.jtests.html.NekoTest
- Xerces version : Xerces-J 2.9.1
Expected :
<html>
<head>
<title>Welcome</title>
</head>
<body>
<h1 class="title">Welcome !</h1>
<p>Hello.</p>
</body>
</html>
Result get :
<html><head>
<title>Welcome</title>
</head><body>
<h1 class="title">Welcome !</h1>
<p>Hello.</p>
</body></html>
--- TEST HTML CASE
class org.inria.ns.reflex.jtests.html.NekoTest - Xerces version : Xerces-J 2.9.1
Parsed DOC :
<html><head>
<title>Welcome</title>
</head><body>
<h1 class="title">Welcome !</h1>
<p>Hello.</p>
</body></html>
--- TEST HTML CASE 2
class org.inria.ns.reflex.jtests.html.NekoTest - Xerces version : Xerces-J 2.9.1
Parsed DOC2 :
<HTML><HEAD>
<TITLE>Welcome</TITLE>
</HEAD><BODY>
<H1 class="title">Welcome !</H1>
<P>Hello.</P>
</BODY></HTML>
|
| 5/38 | org.inria.ns.reflex.jtests.io.RelativizeURITest | 1 | 0 | 0 |
| 6/38 | org.inria.ns.reflex.jtests.io.TokenizerTest | 8 | 0 | 0 |
| 7/38 | org.inria.ns.reflex.jtests.jaxen.NativeJaxenAttrTest | 1 | 0 | 0 |
|
| 8/38 | org.inria.ns.reflex.jtests.jaxen.NativeJaxenBadXPathTest | 1 | 0 | 0 |
| 9/38 | org.inria.ns.reflex.jtests.jaxen.NativeJaxenCompareTest | 1 | 1 | 0 |
| Name | testXPath | | Message | | | Type | junit.framework.AssertionFailedError | | failure | junit.framework.AssertionFailedError
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenCompareTest.doTestXPath(NativeJaxenCompareTest.java:43)
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenCompareTest.testXPath(NativeJaxenCompareTest.java:26)
|
|
| 10/38 | org.inria.ns.reflex.jtests.jaxen.NativeJaxenContainTest | 1 | 0 | 0 |
| 11/38 | org.inria.ns.reflex.jtests.jaxen.NativeJaxenCountTest | 1 | 0 | 0 |
| 12/38 | org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest | 3 | 3 | 0 |
| Name | testXPath0 | | Message | expected:<...(from <foo> to </foo>) contains a single text node (un seul nœud)> but was:<...> | | Type | junit.framework.ComparisonFailure | | failure | junit.framework.ComparisonFailure: expected:<...(from <foo> to </foo>) contains a single text node (un seul nœud)> but was:<...>
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest.doTestXPath(NativeJaxenTextNodeTest.java:57)
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest.testXPath0(NativeJaxenTextNodeTest.java:37)
|
| Name | testXPath1 | | Message | expected:<...(from <foo> to </foo>) contains a single text node (un seul nœud)> but was:<...> | | Type | junit.framework.ComparisonFailure | | failure | junit.framework.ComparisonFailure: expected:<...(from <foo> to </foo>) contains a single text node (un seul nœud)> but was:<...>
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest.doTestXPath(NativeJaxenTextNodeTest.java:57)
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest.testXPath1(NativeJaxenTextNodeTest.java:40)
|
| Name | testXPath2 | | Message | expected:<> but was:<(from <foo> to </foo>)> | | Type | junit.framework.ComparisonFailure | | failure | junit.framework.ComparisonFailure: expected:<> but was:<(from <foo> to </foo>)>
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest.doTestXPath(NativeJaxenTextNodeTest.java:57)
at org.inria.ns.reflex.jtests.jaxen.NativeJaxenTextNodeTest.testXPath2(NativeJaxenTextNodeTest.java:43)
|
|
| 13/38 | org.inria.ns.reflex.jtests.jaxen.ReflexBadXPathTest | 1 | 0 | 0 |
| 14/38 | org.inria.ns.reflex.jtests.jaxen.ReflexCompareTest | 1 | 0 | 0 |
15 mars 2010 18:36:06 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 15/38 | org.inria.ns.reflex.jtests.jaxen.ReflexContainTest | 1 | 0 | 0 |
15 mars 2010 18:36:07 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 16/38 | org.inria.ns.reflex.jtests.jaxen.ReflexCountTest | 1 | 0 | 0 |
15 mars 2010 18:36:08 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 17/38 | org.inria.ns.reflex.jtests.jaxen.ReflexTextNodeTest | 3 | 0 | 0 |
| 18/38 | org.inria.ns.reflex.jtests.json.JsonTest | 12 | 0 | 0 |
org.inria.ns.reflex.util.json.JSONException: Illegal value : found "<", expected either a quoted string or a valid number.
org.inria.ns.reflex.util.json.JSONException: Illegal value : found "a", expected either a quoted string or a valid number.
org.inria.ns.reflex.util.json.JSONException: Illegal value : found "b", expected either a quoted string or a valid number.
org.inria.ns.reflex.util.json.JSONException: Name missing in object ; found END OF ARRAY "]", expected a string.
org.inria.ns.reflex.util.json.JSONException: Illegal value : found "a", expected either a quoted string or a valid number.
java.io.IOException: Invalid escape sequence "Z". '"\/bfnrtu' expected.
java.io.IOException: Invalid escape sequence "012"". Escape sequence '0..9','A..F','a..f' expected.
java.io.IOException: Invalid escape sequence "0Z12". Escape sequence '0..9','A..F','a..f' expected.
org.inria.ns.reflex.util.json.JSONException: Name missing in object ; found "true", expected a string.
org.inria.ns.reflex.util.json.JSONException: Unexpected token in object ; found END OF OBJECT "}", expected a value.
org.inria.ns.reflex.util.json.JSONException: Unexpected end of object ; found END OF OBJECT "}", expected ":"
org.inria.ns.reflex.util.json.JSONException: Name missing in object ; found END OF OBJECT "}", expected a string.
org.inria.ns.reflex.util.json.JSONException: Value missing in array ; found END OF ARRAY "]", expected a value.
org.inria.ns.reflex.util.json.JSONException: Unexpected token in array ; found VALUE SEPARATOR ",", expected a value.
org.inria.ns.reflex.util.json.JSONException: Name missing in object ; found OBJECT SEPARATOR ":", expected a string.
org.inria.ns.reflex.util.json.JSONException: Illegal value : found "/", expected either a quoted string or a valid number.
org.inria.ns.reflex.util.json.JSONException: Illegal value : found "/", expected either a quoted string or a valid number.
|
15 mars 2010 18:36:10 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 19/38 | org.inria.ns.reflex.jtests.pattern.DOMPatternTest | 4 | 0 | 0 |
| 20/38 | org.inria.ns.reflex.jtests.pattern.SAXPatternTest | 1 | 0 | 0 |
Rules : [/root/a {0.5}, b[last()] {0.5}, *[1] {0.5}, b[position()=2] {0.5}, b[@foo] {0.5}, processing-instruction('pi') {0.0}, processing-instruction() {-0.5}, * {-0.5}, text() {-0.5}, node() {-0.5}, / {-0.5}]
/ ()
==> / {-0.5}
root ({ root=(1/1+) }{ node()=(1/1+) }{ *=(1/1+) })
==> *[1] {0.5}
text() ({ text()=(1/1+) }{ node()=(1/1+) })
==> text() {-0.5}
a ({ a=(1/1+) }{ node()=(2/2+) }{ *=(1/1+) })
==> /root/a {0.5}
comment() ({ comment()=(1/1+) }{ node()=(3/3+) })
==> node() {-0.5}
b ({ b=(1/2) }{ node()=(4/6+) }{ *=(2/3+) })
==> * {-0.5}
processing-instruction('pi') ({ processing-instruction('pi')=(1/1+) }{ node()=(5/6+) }{ processing-instruction()=(1/1+) })
==> processing-instruction('pi') {0.0}
b ({ b=(2/2) }{ node()=(6/6+) }{ *=(3/3+) })
==> b[last()] {0.5}
|
15 mars 2010 18:36:12 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 21/38 | org.inria.ns.reflex.jtests.sax.SAXTest | 1 | 0 | 0 |
org.apache.xerces.jaxp.SAXParserImpl
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
START [dtd]
COMMENT Collections
START %plistObject
END %plistObject
START %plistObject
END %plistObject
COMMENT - Primitive types
COMMENT Contents interpreted as Base-64 encoded
COMMENT Contents should conform to a subset of ISO 8601 (in particular, YYYY '-' MM '-' DD 'T' HH ':' MM ':' SS 'Z'. Smaller units may be omitted with a loss of precision)
COMMENT Numerical primitives
COMMENT Boolean constant true
COMMENT Boolean constant false
COMMENT Contents should represent a floating point number matching ("+" | "-")? d+ ("."d*)? ("E" ("+" | "-") d+)? where d is a digit 0-9.
COMMENT Contents should represent a (possibly signed) integer number in base 10
END [dtd]
<?xml version="1.0" encoding="UTF-8"?><!--- Primitive types --><!-- Contents interpreted as Base-64 encoded --><!-- Contents should conform to a subset of ISO 8601 (in particular, YYYY '-' MM '-' DD 'T' HH ':' MM ':' SS 'Z'. Smaller units may be omitted with a loss of precision) --><!-- Numerical primitives --><!-- Boolean constant true --><!-- Boolean constant false --><!-- Contents should represent a floating point number matching ("+" | "-")? d+ ("."d*)? ("E" ("+" | "-") d+)? where d is a digit 0-9. --><!-- Contents should represent a (possibly signed) integer number in base 10 --><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"/>
|
| 22/38 | org.inria.ns.reflex.jtests.scanner.ScannerTest | 8 | 0 | 0 |
| 23/38 | org.inria.ns.reflex.jtests.scanner.StringScannerTest | 8 | 0 | 0 |
| 24/38 | org.inria.ns.reflex.jtests.util.GroupTest | 4 | 0 | 0 |
15 mars 2010 18:36:16 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 25/38 | org.inria.ns.reflex.jtests.util.MapTest | 4 | 0 | 0 |
| 26/38 | org.inria.ns.reflex.jtests.vfs.BugTest | 1 | 0 | 1 |
| Name | testMark | | Message | Stream closed | | Type | java.io.IOException | | error | java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
at java.io.BufferedInputStream.reset(BufferedInputStream.java:414)
at org.inria.ns.reflex.jtests.vfs.BugTest.testMark(BugTest.java:27)
|
|
15 mars 2010 18:36:18 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 27/38 | org.inria.ns.reflex.jtests.vfs.HttpSchemeTest | 3 | 0 | 0 |
15 mars 2010 18:36:19 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 28/38 | org.inria.ns.reflex.jtests.vfs.ResSchemeTest | 1 | 0 | 0 |
file:///media/USER/projects/eclipse/RefleX/build/bin/org/inria/ns/reflex/util/xunit/module.exp
|
15 mars 2010 18:36:21 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 29/38 | org.inria.ns.reflex.jtests.web.ConversationTest | 1 | 0 | 0 |
/media/USER/projects/eclipse/RefleX/build/bin/org/inria/ns/reflex/jtests/web/hello.war
Hello world !
(manœuvre désespérée)
|
| 30/38 | org.inria.ns.reflex.jtests.web.EmuleWGetTest | 1 | 0 | 0 |
/media/USER/projects/eclipse/RefleX/build/bin/org/inria/ns/reflex/jtests/web/hello.war
HTTP/1.1 200
Content-Type: text/plain;charset=ISO-8859-15
Connection: Close
Date: Mon, 15 Mar 2010 17:36:26 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.9)
Hello world !
(manœuvre désespérée)
|
| 31/38 | org.inria.ns.reflex.jtests.xcomponent.AttributesTest | 1 | 0 | 0 |
|
15 mars 2010 18:36:27 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 32/38 | org.inria.ns.reflex.jtests.xml.CanonicalPath2Test | 5 | 0 | 0 |
/toor:root[1]/noNS[1]/a:a[2]/b:b[1]/b:b[3]
/
/toor:root[1]/noNS[1]/a:a[2]/b:b[1]/b:b[3]/@foo
/toor:root[1]/noNS[1]/a:a[2]/b:b[1]/b:b[3]/@a:at
|
| 33/38 | org.inria.ns.reflex.jtests.xml.CanonicalPathTest | 5 | 0 | 0 |
/nsA0:root[1]/noNS[1]/a:a[2]/nsB0:b[1]/nsB0:b[3]
/
/nsC0:root[1]/noNS[1]/a:a[2]/nsD0:b[1]/nsD0:b[3]/@foo
/nsE0:root[1]/noNS[1]/a:a[2]/nsF0:b[1]/nsF0:b[3]/@a:at
|
| 34/38 | org.inria.ns.reflex.jtests.xml.QNameTest | 5 | 0 | 0 |
| 35/38 | org.inria.ns.reflex.jtests.xml.XPathTest | 5 | 0 | 0 |
15 mars 2010 18:36:31 org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
|
| 36/38 | org.inria.ns.reflex.jtests.xpointer.ElementSchemeTest | 4 | 0 | 0 |
| 37/38 | org.inria.ns.reflex.jtests.xpointer.XPointerTest | 1 | 0 | 0 |
| 38/38 | org.inria.ns.reflex.jtests.xs.DataTypesTest | 12 | 0 | 0 |
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the year must have at least 4 digits ; found "123-11-27"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the month must have at least 2 digits < 13 ; found "2008-1-27"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 32 ; found "2008-12-7"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the month must have at least 2 digits < 13 ; found "2008-13-27"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 32 ; found "2008-12-32"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 31 ; found "2008-11-31"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the month must have at least 2 digits < 13 ; found "2008-2-28"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 30 ; found "2008-02-30"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 29 ; found "2009-02-29"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 30 ; found "2000-02-30"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the day must have at least 2 digits < 29 ; found "2100-02-29"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:date expected: the year must have at least 4 digits ; found "+2100-01-01"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:dateTime expected: the day must be followed by "T"; found "2002-10-09-11:00"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected: the hour must have at least 2 digits < 25 ; found "25:20:00"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected; the hour-mn-sec must be "24:00:00" or the hour must be < 24 " ; found "24:00:01"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected: the minute must have at least 2 digits < 60 ; found "23:60:00"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected: the second must have at least 2 digits < 60 ; found "23:59:99"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected: the hour must have at least 2 digits < 25 ; found "2:59:01"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected: the minute must have at least 2 digits < 60 ; found "02:9:01"
org.inria.ns.reflex.processor.asl.types.TypeFormatException: xs:time expected: the second must have at least 2 digits < 60 ; found "02:09:1"
|