lowlevellibsandfws/pluginfw/Test_Bed/inc/TestUtilities.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 // A set of utilities available for testing / debugging /
       
    15 // developing components.
       
    16 // Some macros and a stress test class
       
    17 // CMemoryLeakTest implements a utility class to assist in 
       
    18 // stress testing the memory use of a component
       
    19 // Also intended for use in combination with the TestBed 
       
    20 // components only.
       
    21 // 
       
    22 //
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26  @file
       
    27  @test
       
    28  @since 7.0
       
    29 */
       
    30 
       
    31 #ifndef  __TESTUTILITIES_H__
       
    32 #define  __TESTUTILITIES_H__
       
    33 
       
    34 #include <e32def.h>
       
    35 #include <e32std.h>
       
    36 #include <e32base.h>
       
    37 
       
    38 // __________________________________________________________________________
       
    39 // Enforce ANSI compliance upon the Microsoft compiler!
       
    40 #if defined(__VC32__) && _MSC_VER>=1100
       
    41 #pragma warning(disable : 4127)		// warning C4127 : conditional expression is constant
       
    42 #define for if(false);else for		// Enforce the definition of a loop variable to local scope
       
    43 #endif
       
    44 
       
    45 // __________________________________________________________________________
       
    46 // A useful macro for TO DO messages
       
    47 #define _QUOTE(x) # x
       
    48 #define QUOTE(x) _QUOTE(x)
       
    49 
       
    50 // Use __FILE__LINE__ as a string containing "File.x(line#)" for example:
       
    51 //     #pragma message( __FILE__LINE__ "Remove this line after testing.")
       
    52 // The above example will display the file name and line number in the build window
       
    53 // in such a way as to allow you to double click on it to go to the line in MSDev 6.0.
       
    54 #define __FILE__LINE__ __FILE__ "(" QUOTE(__LINE__) ") : "
       
    55 
       
    56 #endif __TESTUTILITIES_H__