///////////////////////////////////////////////////////////////////////////////////////////////////
-void TestManager::StatSummary::newTCState(const TestCase::State::_v beginState, const TestCase::State::_v endState) throw() {
+void TestManager::StatSummary::newTCState(const TestCase::State::_v beginState, const TestCase::State::_v endState) {
if ((beginState == TestCase::State::Initialized)&&(endState == TestCase::State::Initialized)) { // special case (new test case provisioning)
a_initializedTcs++;
}
}
-void TestManager::StatSummary::clear() throw() {
+void TestManager::StatSummary::clear() {
a_initializedTcs = 0;
a_inprogressTcs = 0;
a_failedTcs = 0;
a_sucessTcs = 0;
}
-anna::xml::Node *TestManager::StatSummary::asXML(anna::xml::Node* parent) const throw() {
+anna::xml::Node *TestManager::StatSummary::asXML(anna::xml::Node* parent) const {
anna::xml::Node* result = parent->createChild("StatSummary");
anna::xml::Node* tcs = result->createChild("TestCasesCounts");
a_currentTestIt = a_testPool.end();
}
-void TestManager::registerKey1(const std::string &key, const TestCase *testCase) throw(anna::RuntimeException) {
+void TestManager::registerKey1(const std::string &key, const TestCase *testCase) noexcept(false) {
auto it = a_key1TestCaseMap.find(key);
if (it != a_key1TestCaseMap.end()) { // found
}
}
-void TestManager::registerKey2(const std::string &key, const TestCase *testCase) throw(anna::RuntimeException) {
+void TestManager::registerKey2(const std::string &key, const TestCase *testCase) noexcept(false) {
auto it = a_key2TestCaseMap.find(key);
if (it != a_key2TestCaseMap.end()) { // found
}
TestTimer* TestManager::createTimer(TestCaseStep* testCaseStep, const anna::Millisecond &timeout, const TestTimer::Type::_v type)
-throw(anna::RuntimeException) {
+noexcept(false) {
TestTimer* result(NULL);
if(a_timeController == NULL)
}
void TestManager::cancelTimer(TestTimer* timer)
-throw() {
+{
if(timer == NULL)
return;
// Se invoca automaticamente desde anna::timex::Engine
//------------------------------------------------------------------------------------------
void TestManager::release(anna::timex::TimeEvent* timeEvent)
-throw() {
+{
TestTimer* timer = static_cast <TestTimer*>(timeEvent);
timer->setContext(NULL);
a_timers.release(timer);
}
-bool TestManager::configureTTPS(int testTicksPerSecond) throw() {
+bool TestManager::configureTTPS(int testTicksPerSecond) {
if (testTicksPerSecond == 0) {
if (a_clock) {
return true;
}
-bool TestManager::gotoTestCase(unsigned int id) throw() {
+bool TestManager::gotoTestCase(unsigned int id) {
test_pool_it it = a_testPool.find(id);
if (it != a_testPool.end()) {
a_currentTestIt = it;
return false;
}
-bool TestManager::runTestCase(unsigned int id) throw() {
+bool TestManager::runTestCase(unsigned int id) {
test_pool_it it = a_testPool.find(id);
if (it != a_testPool.end()) {
a_currentTestIt = it;
return false;
}
-TestCase *TestManager::findTestCase(unsigned int id) const throw() { // id = -1 provides current test case triggered
+TestCase *TestManager::findTestCase(unsigned int id) const { // id = -1 provides current test case triggered
if (!tests()) return NULL;
test_pool_it it = ((id != -1) ? a_testPool.find(id) : a_currentTestIt);
return NULL;
}
-TestCase *TestManager::getTestCase(unsigned int id, const std::string &description) throw() {
+TestCase *TestManager::getTestCase(unsigned int id, const std::string &description) {
test_pool_nc_it it = a_testPool.find(id);
if (it != a_testPool.end()) return it->second;
return result;
}
-bool TestManager::clearPool(std::string &result) throw() {
+bool TestManager::clearPool(std::string &result) {
result = "";
return true;
}
-bool TestManager::resetPool(bool hard) throw() {
+bool TestManager::resetPool(bool hard) {
bool result = false; // any reset
if (!tests()) return result;
return result;
}
-bool TestManager::tick() throw() {
+bool TestManager::tick() {
LOGDEBUG(anna::Logger::debug("New test clock tick !", ANNA_FILE_LOCATION));
return execTestCases(a_synchronousAmount);
}
-bool TestManager::execTestCases(int sync_amount) throw() {
+bool TestManager::execTestCases(int sync_amount) {
if (!tests()) {
LOGWARNING(anna::Logger::warning("Testing pool is empty. You need programming", ANNA_FILE_LOCATION));
return true;
}
-bool TestManager::nextTestCase() throw() {
+bool TestManager::nextTestCase() {
while (true) {
}
}
-TestCase *TestManager::getDiameterTestCaseFromSessionId(const anna::DataBlock &message, std::string &sessionId) throw() {
+TestCase *TestManager::getDiameterTestCaseFromSessionId(const anna::DataBlock &message, std::string &sessionId) {
try {
sessionId = anna::diameter::helpers::base::functions::getSessionId(message);
}
return NULL;
}
-TestCase *TestManager::getDiameterTestCaseFromSubscriberId(const anna::DataBlock &message, std::string &subscriberId) throw() {
+TestCase *TestManager::getDiameterTestCaseFromSubscriberId(const anna::DataBlock &message, std::string &subscriberId) {
try {
subscriberId = anna::diameter::helpers::dcca::functions::getSubscriptionIdData(message, anna::diameter::helpers::dcca::AVPVALUES__Subscription_Id_Type::END_USER_E164);
if (subscriberId == "") // try with IMSI
return NULL;
}
-void TestManager::receiveDiameterMessage(const anna::DataBlock &message, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) {
+void TestManager::receiveDiameterMessage(const anna::DataBlock &message, const anna::diameter::comm::ClientSession *clientSession) noexcept(false) {
// Testing disabled:
if (!tests()) return;
}
}
-void TestManager::receiveDiameterMessage(const anna::DataBlock &message, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) {
+void TestManager::receiveDiameterMessage(const anna::DataBlock &message, const anna::diameter::comm::ServerSession *serverSession) noexcept(false) {
// Testing disabled:
if (!tests()) return;
}
anna::xml::Node* TestManager::asXML(anna::xml::Node* parent) const
-throw() {
+{
anna::xml::Node* result = parent->createChild("TestManager");
int poolSize = a_testPool.size();
result->createAttribute("PoolCycle", a_poolCycle);
a_statSummary.asXML(result);
if (a_inProgressLimit == UINT_MAX)
- result->createAttribute("InProgressLimit", "<no limit>");
+ result->createAttribute("InProgressLimit", "[no limit]");
else
result->createAttribute("InProgressLimit", a_inProgressLimit);
result->createAttribute("DumpInitializedReports", (a_dumpInitializedReports ? "yes":"no"));
}
anna::xml::Node* TestManager::junitAsXML(anna::xml::Node* parent) const
-throw() {
+{
// if only a single testsuite element is present, the testsuites element can be omitted
//anna::xml::Node* result = parent->createChild("testsuites");
anna::xml::Node* result = parent->createChild("testsuite");
return result;
}
-std::string TestManager::asXMLString() const throw() {
+std::string TestManager::asXMLString() const {
anna::xml::Node root("root");
return anna::xml::Compiler().apply(asXML(&root));
}
-std::string TestManager::junitAsXMLString() const throw() {
+std::string TestManager::junitAsXMLString() const {
anna::xml::Node root("root");
return anna::xml::Compiler().apply(junitAsXML(&root));
}
-std::string TestManager::summaryCounts() const throw() {
+std::string TestManager::summaryCounts() const {
std::string result= "\nSummary Counts:\n";
unsigned int total = a_statSummary.getTotal();
return result;
}
-std::string TestManager::summaryStates() const throw() {
+std::string TestManager::summaryStates() const {
std::string result = "\nSummary States:\n";
const char *literal = "\n[%s] %s";