equal
deleted
inserted
replaced
|
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
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 // e32test\bench\t_desbm.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include "t_userbm.h" |
|
19 #include <e32test.h> |
|
20 #include <e32std.h> |
|
21 #include <e32std_private.h> |
|
22 |
|
23 #define FailIfError(EXPR) \ |
|
24 { \ |
|
25 TInt aErr = (EXPR); \ |
|
26 if (aErr != KErrNone) \ |
|
27 { \ |
|
28 test.Printf(_L("Return code == %d\n"), aErr); \ |
|
29 test(EFalse); \ |
|
30 } \ |
|
31 } |
|
32 |
|
33 RTest test(_L("T_DESBM")); |
|
34 |
|
35 TInt E32Main() |
|
36 // |
|
37 // Benchmark for descriptor functions |
|
38 // |
|
39 { |
|
40 CTrapCleanup* trapHandler=CTrapCleanup::New(); |
|
41 test(trapHandler!=NULL); |
|
42 |
|
43 test.Title(); |
|
44 test.Start(_L("Benchmarks for descriptor functions")); |
|
45 |
|
46 TUserBenchmarkList bms; |
|
47 TRAPD(err, RunBenchmarkTestsL(bms)); |
|
48 if (err != KErrNone) |
|
49 test.Printf(_L("TestMainL left with %d\n"), err); |
|
50 |
|
51 FailIfError(err); |
|
52 |
|
53 test.End(); |
|
54 |
|
55 delete trapHandler; |
|
56 return(KErrNone); |
|
57 } |