projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow to automatically reserve an FSM test id
[anna.git]
/
source
/
testing
/
TestManager.cpp
diff --git
a/source/testing/TestManager.cpp
b/source/testing/TestManager.cpp
index
87278f1
..
e90d20d
100644
(file)
--- a/
source/testing/TestManager.cpp
+++ b/
source/testing/TestManager.cpp
@@
-287,6
+287,10
@@
TestCase *TestManager::findTestCase(unsigned int id) const { // id = -1 provides
TestCase *TestManager::getTestCase(unsigned int id, const std::string &description) {
TestCase *TestManager::getTestCase(unsigned int id, const std::string &description) {
+ if (id == 0) { // 0 is used to sequence automatically and get the value of 'tests() + 1'
+ id = tests() + 1;
+ }
+
test_pool_nc_it it = a_testPool.find(id);
if (it != a_testPool.end()) return it->second;
test_pool_nc_it it = a_testPool.find(id);
if (it != a_testPool.end()) return it->second;