From aa76742d416b16aa273f71327aebdf2bc3539549 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Tue, 3 Dec 2013 23:59:24 +0100 Subject: [PATCH] Fix a bug in the test-complexity script and add more test cases. --- tests/test_complexity.sh | 4 ++-- tests/tiny.xml | 9 ++++++++- tests/tiny.xml.results/T1_jaxp.log | 4 ++-- tests/tiny.xml.results/T1_jaxp.xml | 4 +++- tests/tiny.xml.results/T2_jaxp.log | 2 +- tests/tiny.xml.results/T3_jaxp.log | 2 ++ tests/tiny.xml.results/T3_jaxp.xml | 3 +++ 7 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 tests/tiny.xml.results/T3_jaxp.log create mode 100644 tests/tiny.xml.results/T3_jaxp.xml diff --git a/tests/test_complexity.sh b/tests/test_complexity.sh index 815681c..f3cc8f0 100755 --- a/tests/test_complexity.sh +++ b/tests/test_complexity.sh @@ -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 diff --git a/tests/tiny.xml b/tests/tiny.xml index fe1474f..ccfd58a 100644 --- a/tests/tiny.xml +++ b/tests/tiny.xml @@ -1 +1,8 @@ - + + + + + + diff --git a/tests/tiny.xml.results/T1_jaxp.log b/tests/tiny.xml.results/T1_jaxp.log index e212525..03eafcd 100644 --- a/tests/tiny.xml.results/T1_jaxp.log +++ b/tests/tiny.xml.results/T1_jaxp.log @@ -1,2 +1,2 @@ -evaluation time: 75ms -serialization time: 166ms +evaluation time: 74ms +serialization time: 157ms diff --git a/tests/tiny.xml.results/T1_jaxp.xml b/tests/tiny.xml.results/T1_jaxp.xml index eff93ba..a68dc01 100644 --- a/tests/tiny.xml.results/T1_jaxp.xml +++ b/tests/tiny.xml.results/T1_jaxp.xml @@ -1,3 +1,5 @@ - + + + diff --git a/tests/tiny.xml.results/T2_jaxp.log b/tests/tiny.xml.results/T2_jaxp.log index dd20777..02c69de 100644 --- a/tests/tiny.xml.results/T2_jaxp.log +++ b/tests/tiny.xml.results/T2_jaxp.log @@ -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 index 0000000..8c5f970 --- /dev/null +++ b/tests/tiny.xml.results/T3_jaxp.log @@ -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 index 0000000..966585a --- /dev/null +++ b/tests/tiny.xml.results/T3_jaxp.xml @@ -0,0 +1,3 @@ + + + -- 2.17.1