Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Revision:
42:e423e7204e5c
Parent:
40:32b0558320ea
Child:
44:6d0ac4747f5b
--- a/TestManager.cpp	Fri Sep 14 12:58:57 2012 +0000
+++ b/TestManager.cpp	Fri Sep 14 15:13:40 2012 +0000
@@ -146,12 +146,21 @@
    VodafoneTestCase* test = constructTest(testID);//getTest(testID);
    if(test==NULL) {
       LOG("Error. Test %d is not in test list! This will be counted as a failure.",testID);
-      delete test;
+      //delete test;
       return false;
    }
       
    LOG("Running test %d...",testID);
-   if(test->execute()) {
+   //if(test->execute()) { //FIX Donatien
+   /*
+     Error was there:
+     If execute() is called directly, setupTest() and endTest() are NOT called!
+     In Tests 21 & 22 these routines were used to allocate/deallocate the buffer where
+      the USSD result was supposed to be stored
+     This pointer being random, random stuff happened when the USSDInterface tried to copy the response to this address
+   */
+   if(test->run()) 
+   {
       LOG("...OK");
       delete test;
       return true;