TVerdict CDataReadyCancelNotificationStep::doTestStepL() /** * @return - TVerdict code * Override of base class pure virtual * Our implementation only gets called if the base class doTestStepPreambleL() did * not leave. That being the case, the current test result value will be EPass. */ { if (TestStepResult()==EPass) { _LIT8(KTestOutBuf,"test message"); HBufC* InBuf = HBufC::NewLC(KTestOutBuf().Length() / 2); TPtr ptr = InBuf->Des(); TPtr8 inBuf(ptr.Collapse()); TBuf<50> msg; _LIT(KOperReading, "Data available request canceled in port <%d>"); _LIT(KOperWriting, "Written port <%d>"); TRequestStatus status; for(TInt i = 0; i < KSupportedPorts; i++) { if(IsEven(i)) { iPortList[i].port.Write(status, KTestOutBuf); msg.Format(KOperWriting, i); User::WaitForRequest(status); TestErrorCodeL(status.Int(), msg); } else { iPortList[i].port.NotifyDataAvailableCancel(); msg.Format(KOperReading, i); } } CleanupStack::PopAndDestroy(); SetTestStepResult(EPass); } return TestStepResult(); }