os/ossrv/lowlevellibsandfws/pluginfw/Framework/SuicideTests/SuicideTest.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1997-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 "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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include <e32uid.h>
    17 
    18 #include "TestUtilities.h"	// For __FILE__LINE__
    19 #include "SuicideTest.h"
    20 #include "SuicideUnitTests.h"
    21 
    22 CSuicideTest::CSuicideTest(CDataLogger& aDataLogger, 
    23 					   MComponentTestObserver& aObserver)
    24 : CComponentTester(aDataLogger, aObserver)
    25 	{
    26 	}
    27 
    28 CSuicideTest* CSuicideTest::NewLC(CDataLogger& aDataLogger, MComponentTestObserver& aObserver)
    29 	{
    30 	CSuicideTest* self = new (ELeave) CSuicideTest(aDataLogger, aObserver);
    31 	CleanupStack::PushL(self);
    32 	self->ConstructL();
    33 	return self;
    34 	}
    35 
    36 void CSuicideTest::ConstructL()
    37 	{
    38 	ComponentTesterConstructL();
    39 	AddUnitTestL(CSuicideInterfaceFireAndForgetUnitTest::NewL(iDataLogger, *this));
    40 	AddUnitTestL(CSuicideInterfaceCreateAndDestroyUnitTest::NewL(iDataLogger, *this));
    41 	}
    42 
    43 EXPORT_C CComponentTester* NewComponentTestLC(CDataLogger& aDataLogger, 
    44 											MComponentTestObserver&	aComponentTestObserver)
    45 	{
    46 	return CSuicideTest::NewLC(aDataLogger, aComponentTestObserver);
    47 	}
    48 
    49 // ___________________________________________________________________________
    50 //
    51 // This section of the module simply includes the exported test harness template which 
    52 // makes this a "whole" CPP file with a E32Main entry point below. The test MMP 
    53 // project file can then produce a EXE for the test project instead of a DLL.
    54 
    55 #include <ecom/test_bed/testharnesstemplate.h>
    56 
    57 GLDEF_C TInt E32Main()
    58     {
    59 	return E32Main_TestHarness(NewComponentTestLC);
    60 	}
    61