projects
/
cql-java-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cab7222
)
Count iterations and summarise results.
author
Mike Taylor
<mike@miketaylor.org.uk>
Tue, 25 May 2010 14:06:12 +0000
(16:06 +0200)
committer
Mike Taylor
<mike@miketaylor.org.uk>
Tue, 25 May 2010 14:06:12 +0000
(16:06 +0200)
test/random/mkrandom
patch
|
blob
|
history
diff --git
a/test/random/mkrandom
b/test/random/mkrandom
index
f300534
..
185f2c3
100755
(executable)
--- a/
test/random/mkrandom
+++ b/
test/random/mkrandom
@@
-12,12
+12,17
@@
if (@ARGV > 1) {
$n = $ARGV[0];
}
+my $nok = 0;
for (my $i = 0; $i < $n; $i++) {
print $i+1, " of $n -- ";
my $query=`CQLGenerator ../../etc/generate.properties`;
print $query;
my $canon=`CQLParser -c '$query'`;
- if ($canon ne $query) {
+ if ($canon eq $query) {
+ $nok++;
+ } else {
print "ERROR: canonicalised query differs from original\n";
}
}
+
+print "Passed $nok/$n -- ", int(100*$nok/$n), "%\n";