Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Diff: Tests/Test13.h
- Revision:
- 31:9231acdde9ff
- Parent:
- 30:dd2beda340c6
- Child:
- 33:16126e029d58
--- a/Tests/Test13.h Wed Sep 12 10:18:28 2012 +0000 +++ b/Tests/Test13.h Wed Sep 12 16:55:00 2012 +0000 @@ -10,14 +10,14 @@ // it waits forever for an SMS. // TODO: this should wait for a set time before failing. -static const char *gTest13Description = "Waiting for an SMS message..."; -//const int gTest13Depends[] = {}; +static const char *gTest13Description = "Waiting for an SMS message with irregular characters and numbers"; + class Test13 : public VodafoneTestCase { public: char num[17]; - char msg[64]; + char msg[160]; size_t count; @@ -43,13 +43,20 @@ { LOG("%d SMS to read", count); ret = _modem->getSM(num, msg, 64); - if(ret) - { - LOG("Error receiving sms. The method getSMS returned %d", ret); - return false; - } - LOG("The message is from number: %s and the message is: \"%s\"", num, msg); - return true; + + if(ret) + { + LOG("Error receiving sms. The method getSMS returned %d", ret); + return false; + } + LOG("The message is from number: %s and the message is: \"%s\"", num, msg); + if (strcmp (msg, irregularMessage) ==0) + { + LOG("Success receiving alphabet message matches the sent message"); + return true; + } + + return true; } Thread::wait(500); } @@ -57,7 +64,5 @@ } private: - char gsm03dot38CharacterSet[127]; - // gsm03dot38CharacterSet="@£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !“#¤%&‘()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà"; }; \ No newline at end of file