diff --git a/src/test/resources/samples/measurements-rounding-baseline.out b/src/test/resources/samples/measurements-rounding-baseline.out new file mode 100644 index 000000000..0c6e935d3 --- /dev/null +++ b/src/test/resources/samples/measurements-rounding-baseline.out @@ -0,0 +1 @@ +{Rounding=14.6/25.4/33.6} diff --git a/src/test/resources/samples/measurements-rounding-baseline.txt b/src/test/resources/samples/measurements-rounding-baseline.txt new file mode 100644 index 000000000..f7c18a679 --- /dev/null +++ b/src/test/resources/samples/measurements-rounding-baseline.txt @@ -0,0 +1,4 @@ +Rounding;33.6 +Rounding;31.7 +Rounding;21.9 +Rounding;14.6 diff --git a/src/test/resources/samples/measurements-rounding-precise.out b/src/test/resources/samples/measurements-rounding-precise.out new file mode 100644 index 000000000..0cb7c659f --- /dev/null +++ b/src/test/resources/samples/measurements-rounding-precise.out @@ -0,0 +1 @@ +{Rounding=14.6/25.5/33.6} diff --git a/src/test/resources/samples/measurements-rounding-precise.txt b/src/test/resources/samples/measurements-rounding-precise.txt new file mode 100644 index 000000000..f7c18a679 --- /dev/null +++ b/src/test/resources/samples/measurements-rounding-precise.txt @@ -0,0 +1,4 @@ +Rounding;33.6 +Rounding;31.7 +Rounding;21.9 +Rounding;14.6 diff --git a/test.sh b/test.sh index 4bec03641..8c9f2578d 100755 --- a/test.sh +++ b/test.sh @@ -22,7 +22,7 @@ if [ -z "$1" ]; then exit 1 fi -for sample in $(ls src/test/resources/samples/*.txt); do +for sample in $(ls "$2"); do echo "Validating calculate_average_$1.sh -- $sample" rm -f measurements.txt diff --git a/test_all.sh b/test_all.sh index e1141d7b2..03dead842 100755 --- a/test_all.sh +++ b/test_all.sh @@ -21,7 +21,7 @@ for impl in $(ls calculate_average_*.sh | sort); do noext="${impl%%.sh}" name=${noext##calculate_average_} - if output=$(./test.sh "$name" 2>&1); then + if output=$(./test.sh "$name" "$1" 2>&1); then echo "PASS $name" else echo "FAIL $name"