X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Ftesting%2FTestCase.cpp;h=f8d7a986f326d8868c5d5f011e1434863b077c09;hp=efaba5c3d02780c6c68477c7de96831aecf4e6d4;hb=9fa68da11c56250017da9735e4a5dd3fd3b2021b;hpb=d30d9e082885e16f0098a699a3b79f53fb28910b diff --git a/source/testing/TestCase.cpp b/source/testing/TestCase.cpp index efaba5c..f8d7a98 100644 --- a/source/testing/TestCase.cpp +++ b/source/testing/TestCase.cpp @@ -366,11 +366,25 @@ void TestCase::addWait(bool fromEntity, addStep(step); } -void TestCase::addWaitRegexp(bool fromEntity, const std::string ®exp) throw(anna::RuntimeException) { +void TestCase::addWaitRegexpHex(bool fromEntity, const std::string ®exp) throw(anna::RuntimeException) { assertInitialized(); TestStepWait *step = new TestStepWait(this); - step->setCondition(fromEntity, regexp); + step->setConditionRegexpHex(fromEntity, regexp); + + LOGINFORMATION( + if (hasSameCondition(step->getCondition())) + anna::Logger::information(anna::functions::asString("The same wait condition has already been programmed in this test case (%llu). Are you sure ?", a_id), ANNA_FILE_LOCATION); + ); + + addStep(step); +} + +void TestCase::addWaitRegexpXml(bool fromEntity, const std::string ®exp) throw(anna::RuntimeException) { + assertInitialized(); + + TestStepWait *step = new TestStepWait(this); + step->setConditionRegexpXml(fromEntity, regexp); LOGINFORMATION( if (hasSameCondition(step->getCondition()))