diff -r d57b86b1867a -r dc268b18d709 kerneltest/e32test/buffer/t_versio.cpp --- a/kerneltest/e32test/buffer/t_versio.cpp Mon Sep 13 15:16:07 2010 +0100 +++ b/kerneltest/e32test/buffer/t_versio.cpp Wed Sep 22 10:53:45 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -30,8 +30,7 @@ // #include - -const TInt KNumTVersions=1+3*3*3; +#include "d_version.h" class RTvTest : public RTest { @@ -40,8 +39,12 @@ void TestName(); void TestQVS(); void Start(const TDesC &aHeading) {Printf(aHeading);Push();} + TInt LoadDeviceDriver(); + TInt UnloadDeviceDriver(); private: TBool QVS(TInt i,TInt j); +public: + RVersionTest gLdd; private: TVersion* iTV[KNumTVersions]; TVersion iDefTV; // tests default constructor @@ -79,6 +82,38 @@ _S("99.99(999)") }; +TInt RTvTest::LoadDeviceDriver() +// +// Load device driver for kernel side test +// + { + TInt r=KErrNone; + r=User::LoadLogicalDevice(KVersionTestLddName); + if(r!=KErrNone) + { + return r; + } + r=gLdd.Open(); + return r; + } + +TInt RTvTest::UnloadDeviceDriver() +// +// Unload device driver +// + { + TInt r=KErrNone; + gLdd.Close(); + + r = User::FreeLogicalDevice(KVersionTestLddName); + if(r!=KErrNone) + { + return r; + } + User::After(100000); + return r; + } + RTvTest::RTvTest() // // Constructor @@ -117,8 +152,7 @@ // Test the version name // { - - Next(_L("Testing TVersion::Name()")); + Next(_L("Testing TVersion::Name()")); for (TInt i=0; i