Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Files at this revision

API Documentation at this revision

Comitter:
ashleymills
Date:
Thu Sep 13 12:17:18 2012 +0000
Parent:
34:d9e45aad85f2
Child:
36:dd730ff4962e
Child:
37:847f5f86e9ff
Commit message:
Refactoring.

Changed in this revision

TestManager.cpp Show annotated file Show diff for this revision Revisions of this file
Tests/Test13.h Show annotated file Show diff for this revision Revisions of this file
Tests/Tests.h Show annotated file Show diff for this revision Revisions of this file
VodafoneUSBModem_bleedingedge.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TestManager.cpp	Thu Sep 13 10:14:49 2012 +0000
+++ b/TestManager.cpp	Thu Sep 13 12:17:18 2012 +0000
@@ -9,17 +9,17 @@
 TestManager::TestManager(VodafoneUSBModem *m) : _modem(m) {
    // using direct array indexing instead of searching each time
    // dummy tests are inserted by the addTest function
-   addTest((VodafoneTestCase*)new Test10(_modem));
-   addTest((VodafoneTestCase*)new Test12(_modem));
-   addTest((VodafoneTestCase*)new Test13(_modem));
-   addTest((VodafoneTestCase*)new Test16(_modem));
-   addTest((VodafoneTestCase*)new Test21(_modem));
-   addTest((VodafoneTestCase*)new Test22(_modem));
-   addTest((VodafoneTestCase*)new Test23(_modem));
-   addTest((VodafoneTestCase*)new Test25(_modem));
-   addTest((VodafoneTestCase*)new Test26(_modem));
-   addTest((VodafoneTestCase*)new Test50(_modem));
-   addTest((VodafoneTestCase*)new Test56(_modem));
+   _tests.push_back((VodafoneTestCase*)new Test10(m));
+   addTest((VodafoneTestCase*)new Test12(m));
+   addTest((VodafoneTestCase*)new Test13(m));
+   addTest((VodafoneTestCase*)new Test16(m));
+   addTest((VodafoneTestCase*)new Test21(m));
+   addTest((VodafoneTestCase*)new Test22(m));
+   addTest((VodafoneTestCase*)new Test23(m));
+   addTest((VodafoneTestCase*)new Test25(m));
+   addTest((VodafoneTestCase*)new Test26(m));
+   addTest((VodafoneTestCase*)new Test50(m));
+   addTest((VodafoneTestCase*)new Test56(m));
 }
 
 int TestManager::getTestProfileLength(TestProfile profile) {
@@ -47,7 +47,6 @@
 }
 
 void TestManager::listFailures(const int *list, const int listLen) {
-   int successfullTests = 0;
    for(int i=0; i<listLen; i++) {
       int testIndex = list[i];
       VodafoneTestCase* test = getTest(testIndex);
--- a/Tests/Test13.h	Thu Sep 13 10:14:49 2012 +0000
+++ b/Tests/Test13.h	Thu Sep 13 12:17:18 2012 +0000
@@ -18,7 +18,6 @@
       char num[17];
       char msg[160];
       size_t count;
-      
 
       Test13(VodafoneUSBModem *m) : VodafoneTestCase(m) {
          _description = gTest13Description;
--- a/Tests/Tests.h	Thu Sep 13 10:14:49 2012 +0000
+++ b/Tests/Tests.h	Thu Sep 13 12:17:18 2012 +0000
@@ -14,7 +14,7 @@
 
 const int gAllTests[] = {10,16,12,13,21,22,23,25,26,50};
 const int gNumAllTests = 10;
-const int gAutomatedTests[] = {10,21,22,23,25,26};
+const int gAutomatedTests[] = {21,22,23,25,26,10};
 const int gNumAutomatedTests = 6;
 const int gInteractiveTests[] = {16,12,14,13};
 const int gNumInteractiveTests = 4;
--- a/VodafoneUSBModem_bleedingedge.lib	Thu Sep 13 10:14:49 2012 +0000
+++ b/VodafoneUSBModem_bleedingedge.lib	Thu Sep 13 12:17:18 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/donatien/code/VodafoneUSBModem_bleedingedge/#494c1d9d9389
+http://mbed.org/users/donatien/code/VodafoneUSBModem_bleedingedge/#0900b15d44d1
--- a/main.cpp	Thu Sep 13 10:14:49 2012 +0000
+++ b/main.cpp	Thu Sep 13 12:17:18 2012 +0000
@@ -36,15 +36,10 @@
   LOG("Constructing TestManager");
   TestManager *m = new TestManager(&modem);
   LOG("Running tests.");
-
-  
   int numPassed = m->executeTestProfile(TESTS_AUTOMATED);
-  
   loopForever();
 }
 
-
-
 void setTime() {
   struct tm t;
   t.tm_year  = 2012;
@@ -67,9 +62,8 @@
   //setTime();
   size_t currentTime = time(NULL);
   fprintf(stdout,"Invocation time: %s\r\n",ctime(&currentTime));
-  
 
-  Thread testTask(test, NULL, osPriorityNormal, 1024 * 8);
+  Thread testTask(test, NULL, osPriorityNormal, 1024 * 7);
   // this thread just waits and blinks leds periodically
   while(1) {
      led1 = !led1;