|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file CTestSuiteC.cpp |
|
22 */ |
|
23 |
|
24 #include "CTestSuiteC.h" |
|
25 |
|
26 void CTestSuiteC::SetupL() |
|
27 /** |
|
28 * SetupL |
|
29 */ |
|
30 { |
|
31 } |
|
32 |
|
33 void CTestSuiteC::TearDownL() |
|
34 /** |
|
35 * TearDownL |
|
36 */ |
|
37 { |
|
38 } |
|
39 |
|
40 void CTestSuiteC::TestOne() |
|
41 /** |
|
42 * TestOne |
|
43 */ |
|
44 { |
|
45 INFO_PRINTF1(_L("Running SuiteC:One")); |
|
46 TInt theInt = 0; |
|
47 TBool res = iConfig.GetInt(_L("SectionOne"),_L("TheInt"),theInt); |
|
48 ASSERT_TRUE( res ); |
|
49 TBool theBool = EFalse; |
|
50 res = iConfig.GetBool(_L("SectionOne"),_L("TheBool"), theBool); |
|
51 ASSERT_TRUE( res ); |
|
52 INFO_PRINTF3(_L("TheInt = %d The Bool = %d"),theInt,theBool); |
|
53 } |
|
54 |
|
55 /* |
|
56 * A test step |
|
57 */ |
|
58 void CTestSuiteC::TestTwo() |
|
59 /** |
|
60 * TestTwo |
|
61 */ |
|
62 { |
|
63 INFO_PRINTF1(_L("Running SuiteC:Two")); |
|
64 TInt theInt = 0; |
|
65 TBool res = iConfig.GetInt(_L("SectionOne"),_L("TheInt"),theInt); |
|
66 ASSERT_TRUE( res ); |
|
67 TBool theBool = EFalse; |
|
68 res = iConfig.GetBool(_L("SectionOne"),_L("TheBool"), theBool); |
|
69 ASSERT_TRUE( res ); |
|
70 INFO_PRINTF3(_L("TheInt = %d The Bool = %d"),theInt,theBool); |
|
71 } |
|
72 |
|
73 CTestSuite* CTestSuiteC::CreateSuiteL( const TDesC& aName ) |
|
74 /** |
|
75 * CreateSuiteL |
|
76 * |
|
77 * @param aName - Suite name |
|
78 * @return - Suite |
|
79 */ |
|
80 { |
|
81 SUB_SUITE; |
|
82 #ifndef __GCCXML__ |
|
83 ADD_TEST_STEP( TestOne ); |
|
84 ADD_TEST_STEP( TestTwo ); |
|
85 #endif |
|
86 #ifdef __GCCXML__ |
|
87 ADD_TEST_STEP_CLASS( CTestSuiteC, TestOne ); |
|
88 ADD_TEST_STEP_CLASS( CTestSuiteC, TestTwo ); |
|
89 #endif |
|
90 END_SUITE; |
|
91 } |