1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/usbho/t_usbdi/inc/PBASE-T_USBDI-0493.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,98 @@
1.4 +#ifndef __TEST_CASE_PBASE_T_USBDI_0493_H
1.5 +#define __TEST_CASE_PBASE_T_USBDI_0493_H
1.6 +
1.7 +/*
1.8 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.9 +* All rights reserved.
1.10 +* This component and the accompanying materials are made available
1.11 +* under the terms of the License "Eclipse Public License v1.0"
1.12 +* which accompanies this distribution, and is available
1.13 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.14 +*
1.15 +* Initial Contributors:
1.16 +* Nokia Corporation - initial contribution.
1.17 +*
1.18 +* Contributors:
1.19 +*
1.20 +* Description:
1.21 +* @file PBASE-T_USBDI-0493.h
1.22 +* @internalComponent
1.23 +*
1.24 +*
1.25 +*/
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +#include "BaseBulkTestCase.h"
1.31 +
1.32 +
1.33 +namespace NUnitTesting_USBDI
1.34 + {
1.35 +/**
1.36 +
1.37 +
1.38 + @SYMTestCaseID PBASE-T_USBDI-0493
1.39 + @SYMTestCaseDesc Test for bulk transfers for sizes around and equal to a multiple of the max packet size
1.40 + @SYMFssID
1.41 + @SYMPREQ 1305
1.42 + @SYMREQ 7055 [USBD : Bulk transfers]
1.43 + 7062 [USBD : ZLP write handling]
1.44 + @SYMTestType UT
1.45 + @SYMTestPriority 1
1.46 + @SYMTestActions 1. Open interfaces to connected device
1.47 + 2. Request four bulk OUT transfers (so that the total bytes sent will be 1023)
1.48 + 3. Request four bulk IN transfers (expecting data just transferred to peripheral to be sent back)
1.49 + 4. Validate round trip data
1.50 + 5. Repeat steps 2 - 4 twice, increasing the number of bytes transferred by one each time
1.51 + @SYMTestExpectedResults Round trip transfer data is not corrupt
1.52 + @SYMTestStatus Draft
1.53 +
1.54 +
1.55 +*/
1.56 +class CUT_PBASE_T_USBDI_0493 : public CBaseBulkTestCase,
1.57 + public MTransferObserver,
1.58 + public MCommandObserver
1.59 + {
1.60 +public:
1.61 + static CUT_PBASE_T_USBDI_0493* NewL(TBool aHostRole);
1.62 + ~CUT_PBASE_T_USBDI_0493();
1.63 +
1.64 +public: // From MUsbBusObserver
1.65 + void DeviceInsertedL(TUint aDeviceHandle);
1.66 +
1.67 +public: // From MCommandObserver
1.68 + void Ep0TransferCompleteL(TInt aCompletionCode);
1.69 +
1.70 +public: // From MTransferObserver
1.71 + void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
1.72 +
1.73 +private:
1.74 + CUT_PBASE_T_USBDI_0493(TBool aHostRole);
1.75 + void ConstructL();
1.76 +
1.77 +private:
1.78 +
1.79 + enum TCaseStep
1.80 + {
1.81 + EInProgress,
1.82 + EPassed,
1.83 + EFailed,
1.84 + ETransferIn,
1.85 + ETransferOut
1.86 + };
1.87 +
1.88 + TUint iNumTransferBytes;
1.89 +
1.90 + TCaseStep iCaseStep;
1.91 +
1.92 +private:
1.93 + /**
1.94 + The functor for this test case
1.95 + */
1.96 + const static TFunctorTestCase<CUT_PBASE_T_USBDI_0493,TBool> iFunctor;
1.97 + };
1.98 +
1.99 + } //end namespace
1.100 +
1.101 +#endif