[Box Backup-commit] COMMIT r2943 - box/trunk/test/common

subversion at boxbackup.org subversion at boxbackup.org
Sat Apr 23 11:16:13 BST 2011


Author: chris
Date: 2011-04-23 11:16:13 +0100 (Sat, 23 Apr 2011)
New Revision: 2943

Modified:
   box/trunk/test/common/testcommon.cpp
Log:
Log the expected and actual values when comparison failed.


Modified: box/trunk/test/common/testcommon.cpp
===================================================================
--- box/trunk/test/common/testcommon.cpp	2011-04-23 10:15:08 UTC (rev 2942)
+++ box/trunk/test/common/testcommon.cpp	2011-04-23 10:16:13 UTC (rev 2943)
@@ -404,8 +404,10 @@
   		{
 	  		TEST_THAT(!getline.IsEOF());
 	  		std::string line = getline.GetLine(true);
-	  		//printf("expected |%s| got |%s|\n", lines[l], line.c_str());
-	  		TEST_THAT(strcmp(testfilelines[l], line.c_str()) == 0);
+	  		printf("expected |%s| got |%s|\n", testfilelines[l],
+				line.c_str());
+	  		TEST_LINE(strcmp(testfilelines[l], line.c_str()) == 0,
+				line);
 	  		l++;
   		}
   		TEST_THAT(getline.IsEOF());
@@ -455,8 +457,10 @@
 	  		std::string line;
 	  		while(!getline.GetLine(line, true))
 	  			;
-	  		//printf("expected |%s| got |%s|\n", lines[l], line.c_str());
-	  		TEST_THAT(strcmp(testfilelines[l], line.c_str()) == 0);
+	  		printf("expected |%s| got |%s|\n", testfilelines[l],
+				line.c_str());
+	  		TEST_LINE(strcmp(testfilelines[l], line.c_str()) == 0,
+				line);
 	  		l++;
   		}
   		TEST_THAT(getline.IsEOF());




More information about the Boxbackup-commit mailing list