|
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 CTestSuiteB.cpp |
|
22 */ |
|
23 |
|
24 #include "ctestsuiteb.h" |
|
25 #include "ctestsuitec.h" |
|
26 |
|
27 void CTestSuiteB::SetupL() |
|
28 /** |
|
29 * SetupL |
|
30 */ |
|
31 { |
|
32 } |
|
33 |
|
34 void CTestSuiteB::TearDownL() |
|
35 /** |
|
36 * TearDownL |
|
37 */ |
|
38 { |
|
39 } |
|
40 |
|
41 void CTestSuiteB::TestOne() |
|
42 /** |
|
43 * TestOne |
|
44 */ |
|
45 { |
|
46 INFO_PRINTF1(_L("Running SuiteB:One")); |
|
47 TInt theInt = 0; |
|
48 ASSERT_EQUALS( theInt, 0 ); |
|
49 TBool res = iConfig.GetInt(_L("SectionOne"),_L("TheInt"),theInt); |
|
50 ASSERT_TRUE( res ); |
|
51 TBool theBool = EFalse; |
|
52 res = iConfig.GetBool(_L("SectionOne"),_L("TheBool"), theBool); |
|
53 ASSERT_TRUE( res ); |
|
54 INFO_PRINTF3(_L("TheInt = %d The Bool = %d"),theInt,theBool); |
|
55 } |
|
56 |
|
57 void CTestSuiteB::TestTwo() |
|
58 /** |
|
59 * TestTwo |
|
60 */ |
|
61 { |
|
62 INFO_PRINTF1(_L("Running SuiteB:Two")); |
|
63 TInt theInt = 0; |
|
64 TBool res = iConfig.GetInt(_L("SectionOne"),_L("TheInt"),theInt); |
|
65 ASSERT_TRUE( res ); |
|
66 TBool theBool = EFalse; |
|
67 res = iConfig.GetBool(_L("SectionOne"),_L("TheBool"), theBool); |
|
68 ASSERT_TRUE( res ); |
|
69 INFO_PRINTF3(_L("TheInt = %d The Bool = %d"),theInt,theBool); |
|
70 } |
|
71 |
|
72 CTestSuite* CTestSuiteB::CreateSuiteL( const TDesC& aName ) |
|
73 /** |
|
74 * CreateSuiteL |
|
75 * |
|
76 * @param aName - Suite name |
|
77 * @return - Suite |
|
78 */ |
|
79 { |
|
80 SUB_SUITE; |
|
81 #ifndef __GCCXML__ |
|
82 ADD_TEST_STEP( TestOne ); |
|
83 ADD_TEST_STEP( TestTwo ); |
|
84 #endif |
|
85 #ifdef __GCCXML__ |
|
86 ADD_TEST_STEP_CLASS( CTestSuiteB, TestOne ); |
|
87 ADD_TEST_STEP_CLASS( CTestSuiteB, TestTwo ); |
|
88 #endif |
|
89 ADD_TEST_SUITE( CTestSuiteC ) |
|
90 END_SUITE; |
|
91 } |