[Avida-SVN] r1310 - in extras: . source/testsuites
kaben at myxo.css.msu.edu
kaben at myxo.css.msu.edu
Tue Feb 13 06:05:06 PST 2007
Author: kaben
Date: 2007-02-13 09:05:05 -0500 (Tue, 13 Feb 2007)
New Revision: 1310
Modified:
extras/
extras/source/testsuites/nAnalyze.cpp
Log:
r1382 at stochastic: kaben | 2007-02-12 20:42:34 -0500
Restore test cAnalyze_UnitTest_Destructor, but made it not run unless
TestAvida is invoked with "Set_KnownIssues" argument.
Property changes on: extras
___________________________________________________________________
Name: svk:merge
- 079b078a-dbed-46b9-b3da-37668d4295ca:/avida/local/extras:1381
+ 079b078a-dbed-46b9-b3da-37668d4295ca:/avida/local/extras:1382
Modified: extras/source/testsuites/nAnalyze.cpp
===================================================================
--- extras/source/testsuites/nAnalyze.cpp 2007-02-13 14:05:03 UTC (rev 1309)
+++ extras/source/testsuites/nAnalyze.cpp 2007-02-13 14:05:05 UTC (rev 1310)
@@ -1179,6 +1179,51 @@
cAddTestSuite t("cAnalyze_UnitTest_cAvidaConfigDestruction", test);
}
+ /* cAnalyze_UnitTest_Destructor {{{2 */
+ namespace UnitTest_Destructor {
+ void test(){
+ if(!settings.HasSetting("KnownIssues")){
+ cout << "XXX Skipping Template test." << endl;
+ ERROR("kgn at FIXME : Skipping Known Issue - this test triggers an abrupt exit -");
+ return;
+ }
+ cout << "FIXME : interim test. I'm trying to track-down" << endl;
+ cout << "bad destruction of cWorld. When I figure out" << endl;
+ cout << "what's wrong, move this test to reflect the" << endl;
+ cout << "source of the bug. @kgn" << endl;
+ cout << "XXX This is a test stub. It needs filling-in. @kgn" << endl;
+
+ char * argv[] = {
+ "cAnalyze_UnitTest_Destructor",
+ "-c", "gcs_avida.cfg",
+ };
+ int argc = sizeof(argv)/sizeof(char *);
+
+ cout << "argc : " << argc << endl;
+
+ cDriverManager::Initialize();
+ cWorld *world = new cWorld(
+ cAvidaConfig::LoadWithCmdLineArgs(argc, argv)
+ );
+ cAvidaDriver* driver = NULL;
+
+ if (world->GetConfig().ANALYZE_MODE.Get() > 0) {
+ driver = new cDefaultAnalyzeDriver(world, (world->GetConfig().ANALYZE_MODE.Get() == 2));
+ } else {
+ driver = new cDefaultRunDriver(world);
+ }
+
+ driver->Run();
+
+ /*
+ FIXME : driver currently deletes world.
+ */
+ delete driver;
+ //delete world;
+ }
+ cAddTestSuite t("cAnalyze_UnitTest_Destructor", test);
+ }
+
/* cAnalyze_UnitTest_Archiving {{{2 */
namespace UnitTest_Archiving {
void test(cTestSettings &settings){
More information about the Avida-cvs
mailing list