Update contrib.
1 // Copyright (c) 2005-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\bench\t_kernasmbm.cpp
18 #include "d_kernasmbm.h"
20 #include <e32std_private.h>
24 @SYMTestCaseID KBASE-0046-t_kernasmbm
27 @SYMTestCaseDesc This is a performance test used to get a relative indication
28 of the speed of assmbler functions in the kernel
29 @SYMTestPriority Medium
30 @SYMTestActions Runs benchmarks for kernel functions
31 @SYMTestExpectedResults Results are for information - no specific results expected
34 #define FailIfError(EXPR) \
37 if (aErr != KErrNone) \
39 test.Printf(_L("Return code == %d\n"), aErr); \
44 _LIT(KLddFileName, "D_KERNASMBM.LDD");
45 RTest test(_L("T_KERNASMBM"));
47 RKernAsmBmLdd TestLdd;
52 User::LeaveIfError(User::LoadLogicalDevice(KLddFileName));
53 User::LeaveIfError(TestLdd.Open());
58 CTrapCleanup* trapHandler=CTrapCleanup::New();
59 test(trapHandler!=NULL);
62 test.Start(_L("Benchmarks for assmblerised kernel functions\n"));
64 TRAPD(err, RunBenchmarkTestsL(TestLdd));
66 test.Printf(_L("TestMainL left with %d\n"), err);
69 User::After(10 * 1000);
70 FailIfError(User::FreeLogicalDevice(KKernAsmBmLddName));