changeset 108:8b4924a9a072

Print diff
author Chris Cannam
date Thu, 02 Oct 2014 14:31:47 +0100
parents 76d9d86ae6cd
children 78a7c77ba432
files runner/FeatureExtractionManager.h tests/test-include.sh tests/test-summaries.sh tests/test-transforms-basic.sh
diffstat 4 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/runner/FeatureExtractionManager.h	Wed Oct 01 17:50:58 2014 +0100
+++ b/runner/FeatureExtractionManager.h	Thu Oct 02 14:31:47 2014 +0100
@@ -78,7 +78,7 @@
     typedef map<Transform, vector<FeatureWriter *> > TransformWriterMap;
     typedef map<Vamp::Plugin *, TransformWriterMap> PluginMap;
     PluginMap m_plugins;
-        
+
     // And a map back from transforms to their plugins.  Note that
     // this is keyed by transform, not transform ID -- two differently
     // configured transforms with the same ID must use different
--- a/tests/test-include.sh	Wed Oct 01 17:50:58 2014 +0100
+++ b/tests/test-include.sh	Thu Oct 02 14:31:47 2014 +0100
@@ -22,4 +22,23 @@
     return `[ -z "$out" ]`
 }
 
+faildiff() {
+    echo "Test failed: $1"
+    if [ -n "$2" -a -n "$3" ]; then
+	echo "Output follows:"
+	echo "--"
+	cat $2
+	echo "--"
+	echo "Expected output follows:"
+	echo "--"
+	cat $3
+	echo "--"
+	echo "Diff:"
+	echo "--"
+	sdiff -w78 $2 $3
+	echo "--"
+    fi
+    exit 1
+}
 
+
--- a/tests/test-summaries.sh	Wed Oct 01 17:50:58 2014 +0100
+++ b/tests/test-summaries.sh	Thu Oct 02 14:31:47 2014 +0100
@@ -15,25 +15,6 @@
 
 . test-include.sh
 
-faildiff() {
-    echo "Test failed: $1"
-    if [ -n "$2" -a -n "$3" ]; then
-	echo "Output follows:"
-	echo "--"
-	cat $2
-	echo "--"
-	echo "Expected output follows:"
-	echo "--"
-	cat $3
-	echo "--"
-	echo "Diff:"
-	echo "--"
-	sdiff -w78 $2 $3
-	echo "--"
-    fi
-    exit 1
-}
-
 compare() {
     a=$1
     b=$2
--- a/tests/test-transforms-basic.sh	Wed Oct 01 17:50:58 2014 +0100
+++ b/tests/test-transforms-basic.sh	Thu Oct 02 14:31:47 2014 +0100
@@ -59,7 +59,7 @@
 	    fail "Fails to run transform $transform"
 
 	csvcompare $tmpfile2 $expected || \
-	    fail "Output mismatch for transform $transform"
+	    faildiff "Output mismatch for transform $transform" $tmpfile2 $expected
     done
 done