--- a/smsprotocols/smsstack/smsprot/Test/TE_Smsprt/TE_EnumerateInOODCondition.cpp Fri Mar 19 09:55:57 2010 +0200
+++ b/smsprotocols/smsstack/smsprot/Test/TE_Smsprt/TE_EnumerateInOODCondition.cpp Fri Apr 16 16:12:37 2010 +0300
@@ -24,25 +24,24 @@
Each test step initialises it's own name
*/
{
- iSocketServer = &aSocketServer;
+ iSharedSocketServer = &aSocketServer;
+ iPartOfMultiStepTestCase = ETrue;
}
/**
Enumerates SIM messages.
- */
+ */
TVerdict CEnumerateInOODCondition::doTestStepL()
{
#ifndef _DEBUG
INFO_PRINTF1(_L("This test can only be run when the SMS Stack is in debug mode."));
#else
- //PrepareRegTestLC(*iSocketServer, 17);
+ //Open a socket
+ RSocket socket;
+ OpenSmsSocketL(*iSharedSocketServer, socket, ESmsAddrRecvAny);
+ CleanupClosePushL(socket);
- //Open a socket
- INFO_PRINTF1(_L("Opening socket..."));
- RSocket socket;
- OpenSmsSocketL(*iSocketServer, socket, ESmsAddrRecvAny);
-
TRequestStatus status;
TPckgBuf<TUint> sbuf;
sbuf()=0;
@@ -50,21 +49,9 @@
//Now enumerate messages from store
socket.Ioctl(KIoctlEnumerateSmsMessages,status,&sbuf, KSolSmsProv);
User::WaitForRequest(status);
+ TESTCHECK(status.Int(), KErrDiskFull, "Checking the Enumeration was unsuccessful due to the disk being full");
- //The Enumeration should fail due to the disk being full and returns KErrDiskFull
- if(status==KErrDiskFull)
- {
- INFO_PRINTF1(_L("Status = KErrDiskFull"));
- }
- else
- {
- TEST(EFalse);
- }
-
- socket.Close();
+ CleanupStack::PopAndDestroy(&socket);
#endif
return TestStepResult();
}
-//----------------------------------------------------------------------------->
-
-