From 90c0b42a07dfd35c02ef69e96e7356b300e058b2 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Mon, 4 Feb 2013 05:09:52 +0000 Subject: [PATCH] changed the defaults of the testsuite game constructor to set the default timerlimit to 6 the other threads were running test suite at 0 which was causing race condition fails in test suite, i incremented by 1 until the normally passing test no longer failed, test effected were proliferate and mortician beetle both passing test in normal mode, failing in hyperspeed. test suite takes only 30 secs more to run but we can't sacrifice actual results for speed. the commented out section is not even taken into account after first test is run. --- projects/mtg/src/TestSuiteAI.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/mtg/src/TestSuiteAI.cpp b/projects/mtg/src/TestSuiteAI.cpp index cd89949de..db2ef4444 100644 --- a/projects/mtg/src/TestSuiteAI.cpp +++ b/projects/mtg/src/TestSuiteAI.cpp @@ -306,10 +306,10 @@ void TestSuite::initGame(GameObserver* g) { timerLimit = 40; } - else - { - timerLimit = 3; - } + //else + //{ + // timerLimit = 10; + //} TestSuiteGame::initGame(); } @@ -465,7 +465,7 @@ TestSuite::~TestSuite() TestSuite::TestSuite(const char * filename) : TestSuiteGame(0), mRules(0), mProcessing(false) { - timerLimit = 0; + timerLimit = 3; testsuite = this; std::string s; @@ -792,13 +792,13 @@ TestSuiteGame::~TestSuiteGame() } TestSuiteGame::TestSuiteGame(TestSuite* testsuite) - : summoningSickness(0), forceAbility(false), gameType(GAME_TYPE_CLASSIC), timerLimit(0), + : summoningSickness(0), forceAbility(false), gameType(GAME_TYPE_CLASSIC), timerLimit(6), currentAction(0), observer(0), testsuite(testsuite) { } TestSuiteGame::TestSuiteGame(TestSuite* testsuite, string _filename) - : summoningSickness(0), forceAbility(false), gameType(GAME_TYPE_CLASSIC), timerLimit(3), + : summoningSickness(0), forceAbility(false), gameType(GAME_TYPE_CLASSIC), timerLimit(6), currentAction(0), observer(0), testsuite(testsuite) { filename = _filename;