sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\bench\t_userasmbm.cpp sl@0: // sl@0: // sl@0: sl@0: #include "t_userbm.h" sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: @SYMTestCaseID KBASE-0047-t_userasmbm sl@0: @SYMPREQ PREQ521 sl@0: @SYMREQ REQ4891 sl@0: @SYMTestCaseDesc This is a performance test used to get a relative indication sl@0: of the speed of assmbler functions in euser sl@0: @SYMTestPriority Medium sl@0: @SYMTestActions Runs benchmarks for euser functions sl@0: @SYMTestExpectedResults Results are for information - no specific results expected sl@0: */ sl@0: sl@0: #define FailIfError(EXPR) \ sl@0: { \ sl@0: TInt aErr = (EXPR); \ sl@0: if (aErr != KErrNone) \ sl@0: { \ sl@0: test.Printf(_L("Return code == %d\n"), aErr); \ sl@0: test(EFalse); \ sl@0: } \ sl@0: } sl@0: sl@0: RTest test(_L("T_USERASMBM")); sl@0: sl@0: TInt E32Main() sl@0: // sl@0: // Benchmark for euser assmblerised functions sl@0: // sl@0: { sl@0: CTrapCleanup* trapHandler=CTrapCleanup::New(); sl@0: test(trapHandler!=NULL); sl@0: sl@0: test.Title(); sl@0: test.Start(_L("Benchmarks for assemblerised euser functions")); sl@0: sl@0: TUserBenchmarkList bms; sl@0: TRAPD(err, RunBenchmarkTestsL(bms)); sl@0: if (err != KErrNone) sl@0: test.Printf(_L("TestMainL left with %d\n"), err); sl@0: sl@0: FailIfError(err); sl@0: sl@0: test.End(); sl@0: sl@0: delete trapHandler; sl@0: return(KErrNone); sl@0: }