[Box Backup-commit] COMMIT r1337 - box/chris/general/infrastructure
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sat, 03 Mar 2007 22:17:56 +0000
Author: chris
Date: 2007-03-03 22:17:56 +0000 (Sat, 03 Mar 2007)
New Revision: 1337
Modified:
box/chris/general/infrastructure/buildenv-testmain-template.cpp
Log:
Initialise memory leak finder at start of tests.
Initialise timers before tests and clean them up afterwards.
(from chris/merge)
Modified: box/chris/general/infrastructure/buildenv-testmain-template.cpp
===================================================================
--- box/chris/general/infrastructure/buildenv-testmain-template.cpp 2007-03-03 22:17:01 UTC (rev 1336)
+++ box/chris/general/infrastructure/buildenv-testmain-template.cpp 2007-03-03 22:17:56 UTC (rev 1337)
@@ -2,6 +2,9 @@
// AUTOMATICALLY GENERATED FILE
// do not edit
//
+// Note that infrastructure/buildenv-testmain-template.cpp is NOT
+// auto-generated, but test/*/_main.cpp are generated from it.
+//
// --------------------------------------------------------------------------
@@ -23,6 +26,7 @@
#include <stdarg.h>
#include <fcntl.h>
#include <errno.h>
+#include <string>
#ifdef WIN32
#include "emu.h"
@@ -31,6 +35,7 @@
#endif
#include "Test.h"
+#include "Timer.h"
#include "MemLeakFindOn.h"
@@ -117,7 +122,13 @@
}
try
{
+ #ifdef BOX_MEMORY_LEAK_TESTING
+ memleakfinder_init();
+ #endif
+
+ Timers::Init();
int returncode = test(argc, argv);
+ Timers::Cleanup();
// check for memory leaks, if enabled
#ifdef BOX_MEMORY_LEAK_TESTING