author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 02:35:35 +0300 | |
changeset 281 | 13fbfa31d2ba |
parent 0 | a41df078684a |
permissions | -rw-r--r-- |
281
13fbfa31d2ba
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1 |
// Copyright (c) 1994-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 2 |
// All rights reserved. |
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// |
|
15 |
||
16 |
/** |
|
17 |
@file |
|
18 |
@publishedAll |
|
19 |
@interim |
|
20 |
*/ |
|
21 |
||
22 |
#ifndef __TMSMAIN_H__ |
|
23 |
#define __TMSMAIN_H__ |
|
24 |
||
25 |
#include <f32file.h> |
|
26 |
#include <e32test.h> |
|
27 |
#include <e32math.h> |
|
28 |
||
29 |
enum TTestType{ENotifierNone,ENotifierHang,ENotifierRepeat,ENotifierWithRepeat}; |
|
30 |
||
31 |
GLREF_D RTest test; |
|
32 |
||
33 |
//forward declaration for all scsi protocol tests |
|
34 |
GLDEF_C void t_scsi_prot(); |
|
35 |
||
36 |
||
281
13fbfa31d2ba
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
37 |
GLDEF_C void TestIfEqual( TInt aValue, TInt aExpected, TInt aLine, const char aFileName[]); |
0 | 38 |
#define TEST_FOR_VALUE( r, expected ) TestIfEqual( r, expected, __LINE__, __FILE__) |
39 |
||
40 |
#define TEST_SENSE_CODE( aSensePtr, aExpKey, aExtAddCode ) \ |
|
41 |
{ \ |
|
42 |
TRequestSenseData senseDataErr (aSensePtr); \ |
|
43 |
TEST_FOR_VALUE (senseDataErr.Key(), aExpKey); \ |
|
44 |
TEST_FOR_VALUE (senseDataErr.AdditionalCode(), aExtAddCode);\ |
|
45 |
} |
|
46 |
||
47 |
||
48 |
#define TEST_SENSE_CODE_IF_SUPPORTED( aSensePtr, aExpKey, aExtAddCode ) \ |
|
49 |
TRequestSenseData senseDataErr (aSensePtr); \ |
|
50 |
TBool doit = ETrue; \ |
|
51 |
if((senseDataErr.Key() == TSenseInfo::EIllegalRequest) && \ |
|
52 |
(senseDataErr.AdditionalCode() == TSenseInfo::EInvalidCmdCode)) \ |
|
53 |
{ \ |
|
54 |
RDebug::Print(_L("Prevent Media Removal command not supported by this build\n")); \ |
|
55 |
doit = EFalse; \ |
|
56 |
} \ |
|
57 |
else \ |
|
58 |
{ \ |
|
59 |
TEST_FOR_VALUE (senseDataErr.Key(), aExpKey); \ |
|
60 |
TEST_FOR_VALUE (senseDataErr.AdditionalCode(), aExtAddCode); \ |
|
61 |
} \ |
|
62 |
if(doit) |
|
63 |
||
64 |
||
65 |
#endif //__TMSMAIN_H__ |