Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Revision:
22:5b1feecf2aeb
Parent:
20:18373fb68ad7
Child:
23:408199b5d2cb
--- a/TestManager.cpp	Tue Sep 04 15:36:59 2012 +0000
+++ b/TestManager.cpp	Wed Sep 05 14:47:44 2012 +0000
@@ -13,12 +13,35 @@
    _tests.push_back((VodafoneTestCase*)new Test21(_modem,21));
    _tests.push_back((VodafoneTestCase*)new Test22(_modem,22));
    _tests.push_back((VodafoneTestCase*)new Test23(_modem,23));
-   for(int i=24; i<50; i++) {
+   for(int i=24; i<25; i++) {
+      _tests.push_back(NULL);
+   }
+   _tests.push_back((VodafoneTestCase*)new Test25(_modem,25));
+   _tests.push_back((VodafoneTestCase*)new Test26(_modem,26));
+   for(int i=27; i<50; i++) {
       _tests.push_back(NULL);
    }
    _tests.push_back((VodafoneTestCase*)new Test50(_modem,50));
 }
 
+int TestManager::getTestProfileLength(TestProfile profile) {
+    if(profile>=0 && profile <TESTS_END) {
+      return gTestProfileLengths[profile];
+   } else {
+      LOG("Test profile out of bounds. Must be between 0 and %d",TESTS_END-1);
+      return 0;
+   }
+}
+
+int TestManager::executeTestProfile(TestProfile profile) {
+   if(profile>=0 && profile <TESTS_END) {
+      return executeTestList(gTestProfiles[profile], gTestProfileLengths[profile]);
+   } else {
+      LOG("Test profile out of bounds. Must be between 0 and %d",TESTS_END-1);
+      return 0;
+   }
+}
+
 int TestManager::executeTestList(const int *list, const int listLen) {
    int successfullTests = 0;
    LOG("Running %d tests...",listLen);