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\emul\t_jit.cpp sl@0: // Overview: sl@0: // Test that User::JustInTime() initially corresponds to the JustInTime setting sl@0: // in epoc.ini. sl@0: // This is a manual test, and must be run by hand with an argument of 0 or 1 to sl@0: // specify the expected result, eg: sl@0: // t_jit -- 1 sl@0: // t_jit -DJustInTime=none -- 0 sl@0: // API Information: sl@0: // Emulator sl@0: // Details: sl@0: // Test User::JustInTime corresponds to command line argument. sl@0: // Platforms/Drives/Compatibility: sl@0: // Emulator. sl@0: // Assumptions/Requirement/Pre-requisites: sl@0: // Failures and causes: sl@0: // Base Port information: sl@0: // sl@0: // sl@0: sl@0: #include sl@0: sl@0: RTest test(_L("t_jit")); sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: { sl@0: test.Title(); sl@0: test.Start(_L("Just in time")); sl@0: sl@0: test(User::CommandLineLength() == 1); sl@0: TBuf<1> cmd; sl@0: User::CommandLine(cmd); sl@0: TLex lex(cmd); sl@0: TInt val; sl@0: test(lex.Val(val) == KErrNone); sl@0: test (val == 0 || val == 1); sl@0: TBool expected = val == 1; sl@0: sl@0: test(User::JustInTime() == expected); sl@0: sl@0: test.End(); sl@0: test.Close(); sl@0: return KErrNone; sl@0: }