Fix a bug in the test-complexity script and add more test cases.
authorKim Nguyễn <kn@lri.fr>
Tue, 3 Dec 2013 22:59:24 +0000 (23:59 +0100)
committerKim Nguyễn <kn@lri.fr>
Tue, 3 Dec 2013 22:59:24 +0000 (23:59 +0100)
tests/test_complexity.sh
tests/tiny.xml
tests/tiny.xml.results/T1_jaxp.log
tests/tiny.xml.results/T1_jaxp.xml
tests/tiny.xml.results/T2_jaxp.log
tests/tiny.xml.results/T3_jaxp.log [new file with mode: 0644]
tests/tiny.xml.results/T3_jaxp.xml [new file with mode: 0644]

index 815681c..f3cc8f0 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-S="//Z/ancestor::A"
+S="//M/ancestor::A"
 Q="$S"
 
 for i in `seq 1 30`
@@ -8,7 +8,7 @@ do
     src/tatoo.native -s -d tests/alphabet.xml -o /dev/null -c "$Q" 2> /tmp/log
     ST=`grep 'Number of states' /tmp/log  | cut -f 2 -d :`
     TM=`grep 'evaluating query in' /tmp/log  | cut -f 3 -d : | cut -f 1 -d m`
-    RU=`grep 'number of runs' /tmp/log  | cut -f 3 -d :`
+    RU=`grep 'traversals' /tmp/log  | cut -f 2 -d :`
     echo "$i", "$ST", "$TM", "$RU"
     Q="$Q""$S"
 done
index fe1474f..ccfd58a 100644 (file)
@@ -1 +1,8 @@
-<a><b><c></c></b></a>
+<a>
+  <b/>
+  <b> <c> </c> </b>
+  <d><!--<e/> <f> <g/> </f>
+     <h/>
+  --></d>
+  <b><i/></b>
+</a>
index e212525..03eafcd 100644 (file)
@@ -1,2 +1,2 @@
-evaluation time: 75ms
-serialization time: 166ms
+evaluation time: 74ms
+serialization time: 157ms
index eff93ba..a68dc01 100644 (file)
@@ -1,3 +1,5 @@
 <xml_result num="1">
-<b><c/></b>
+<b/>
+<b> <c> </c> </b>
+<b><i/></b>
 </xml_result>
index dd20777..02c69de 100644 (file)
@@ -1,2 +1,2 @@
-evaluation time: 75ms
+evaluation time: 77ms
 serialization time: 0ms
diff --git a/tests/tiny.xml.results/T3_jaxp.log b/tests/tiny.xml.results/T3_jaxp.log
new file mode 100644 (file)
index 0000000..8c5f970
--- /dev/null
@@ -0,0 +1,2 @@
+evaluation time: 80ms
+serialization time: 166ms
diff --git a/tests/tiny.xml.results/T3_jaxp.xml b/tests/tiny.xml.results/T3_jaxp.xml
new file mode 100644 (file)
index 0000000..966585a
--- /dev/null
@@ -0,0 +1,3 @@
+<xml_result num="1">
+<d/>
+</xml_result>