Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Revision:
13:8b69853966f8
Parent:
9:3ff68422f4d7
Child:
25:55b865c41f21
--- a/Tests/Test12.h	Tue Aug 28 15:40:07 2012 +0000
+++ b/Tests/Test12.h	Wed Aug 29 14:13:49 2012 +0000
@@ -3,6 +3,14 @@
 
 #define TEST_PHONE_NUMBER "+447717275049"
 
+// this test case will wait to receive an SMS from the modem.
+// if the method that reports a message waiting returns an error it will fail.
+// if the method that returns the message from the mailbox returns an error it will fai.
+// it will report the test as failed if any of the above happens.
+// it waits forever for an SMS.
+// TODO: this should wait for a set time before failing.
+
+
 class Test12 : public VodafoneTestCase {
    public: 
 
@@ -10,16 +18,16 @@
       char msg[64];
       size_t count;
 
-      Test12(VodafoneUSBModem *m) : VodafoneTestCase(m) {
+      Test12(VodafoneUSBModem *m, int tcNumber) : VodafoneTestCase(m, tcNumber) {
       }
    
       virtual bool runTest() {
+         LOG("Test %d waiting for an SMS message...", _testCaseNumber);
          LOG("Receiving SMS from test phone, waiting for response.");
-         char smsResponse[64];
       
          while(true)
             {
-             LOG("Test 12 waiting for an SMS message...");
+             LOG("Waiting for an SMS message...");
              int ret = _modem->getSMCount(&count);
              if(ret)
                 {