Update contrib.
1 // Copyright (c) 2007-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\earlyextension\t_testextension.cpp
20 #include "d_testearlyextension.h"
22 RLddEarlyExtensionTest lddChan;
23 GLDEF_D RTest test(_L("LDD tests"));
24 _LIT(KLddFileName, "D_TESTEARLYEXTENSION.LDD");
26 GLDEF_C TInt E32Main()
29 test.Start(_L("Testing early extension...\n"));
31 TInt r = User::LoadLogicalDevice(KLddFileName);
32 test((r == KErrNone) || (r == KErrAlreadyExists));
35 test(r==KErrNone || r==KErrAlreadyExists);
36 Int64 earlyExtTime = 0, extTime = 0;
37 //Get system time stamps
38 r = lddChan.Test_getSystemTimeStamps(earlyExtTime, extTime);
40 //Compare the time stamps for correctness.
41 //Time stamps got in early extension should be less than (valuewise) the one got in normal extension entry point.
42 if(earlyExtTime > extTime)
44 test.Printf(_L("Early Extension time stamp %ld is greater than extension time stamp %ld\n"), earlyExtTime, extTime);
47 test.Printf(_L("Time stamps are as expected!!!\n"));
48 test.Printf(_L("Closing the channel\n"));
51 test.Printf(_L("Freeing logical device\n"));
52 r = User::FreeLogicalDevice(KLddFileName);