[Box Backup-commit] COMMIT r1563 - box/chris/merge/lib/common

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sun Apr 22 16:16:50 BST 2007


Author: chris
Date: 2007-04-22 16:16:50 +0100 (Sun, 22 Apr 2007)
New Revision: 1563

Modified:
   box/chris/merge/lib/common/Test.h
Log:
Display file and line where memory leak test failed. (refs #3)


Modified: box/chris/merge/lib/common/Test.h
===================================================================
--- box/chris/merge/lib/common/Test.h	2007-04-22 15:13:59 UTC (rev 1562)
+++ box/chris/merge/lib/common/Test.h	2007-04-22 15:16:50 UTC (rev 1563)
@@ -317,7 +317,8 @@
 			first_fail_line = line;
 		}
 		++failures;
-		printf("FAILURE: MemLeak report not available (file %s)\n", filename);
+		printf("FAILURE: MemLeak report not available (file %s) "
+			"at %s:%d\n", filename, file, line);
 	}
 	else
 	{
@@ -331,12 +332,13 @@
 			}
 			++failures;
 			printf("FAILURE: Memory leaks found in other process "
-				"(file %s)\n==========\n", filename);
+				"(file %s) at %s:%d\n==========\n", 
+				filename, file, line);
 			FILE *f = fopen(filename, "r");
-			char line[512];
-			while(::fgets(line, sizeof(line), f) != 0)
+			char linebuf[512];
+			while(::fgets(linebuf, sizeof(linebuf), f) != 0)
 			{
-				printf("%s", line);
+				printf("%s", linebuf);
 			}
 			fclose(f);
 			printf("==========\n");




More information about the Boxbackup-commit mailing list