baseintegtests/baseintegrationtest/testsuites/fat32/inc/basetedefs.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 /**
       
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Contains useful macros etc. for logging in a Test Execute Environment
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file BaseTEDefs.h
       
    24 */
       
    25 
       
    26 
       
    27 #ifndef BASETEDEFS_H
       
    28 #define BASETEDEFS_H
       
    29 
       
    30 #define DO_TEST(COND)     				CarryOutTest((COND),((TText8*)__FILE__), __LINE__)
       
    31 #define DO_TEST2(PTR,COND)				(PTR)->CarryOutTest((COND),((TText8*)__FILE__), __LINE__)
       
    32 #define DO_TEST3(THREAD,PTR,COND)		(PTR)->CarryOutTest((THREAD),(COND),((TText8*)__FILE__), __LINE__)
       
    33 
       
    34 #define INFO_PRINTF8(p1, p2, p3, p4, p5, p6, p7, p8)	Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8))
       
    35 
       
    36 
       
    37 //define DO_TEST(COND, ERR_NUM)	if((COND)!=true){User::Panic(KBaseTestTAct,(ERR_NUM));}
       
    38 
       
    39 #define DO_PRINTF1(PTEST,P1)						(PTEST)->INFO_PRINTF1((P1))
       
    40 #define DO_PRINTF2(PTEST,P1,P2)						(PTEST)->INFO_PRINTF2((P1),(P2))
       
    41 #define DO_PRINTF3(PTEST,P1,P2,P3)					(PTEST)->INFO_PRINTF3((P1),(P2),(P3))
       
    42 #define DO_PRINTF4(PTEST,P1,P2,P3,P4)				(PTEST)->INFO_PRINTF4((P1),(P2),(P3),(P4))
       
    43 #define DO_PRINTF5(PTEST,P1,P2,P3,P4,P5)			(PTEST)->INFO_PRINTF5((P1),(P2),(P3),(P4),(P5))
       
    44 #define DO_PRINTF6(PTEST,P1,P2,P3,P4,P5,P6)			(PTEST)->INFO_PRINTF6((P1),(P2),(P3),(P4),(P5),(P6))
       
    45 #define DO_PRINTF7(PTEST,P1,P2,P3,P4,P5,P6,P7)		(PTEST)->INFO_PRINTF7((P1),(P2),(P3),(P4),(P5),(P6),(P7))
       
    46 #define DO_PRINTF8(PTEST,P1,P2,P3,P4,P5,P6,P7,P8)	(PTEST)->INFO_PRINTF8((P1),(P2),(P3),(P4),(P5),(P6),(P7),(P8))
       
    47 
       
    48 #define DO_THREAD_PRINTF1(PTEST,P1)   \
       
    49 					{\
       
    50 						RCriticalSection * pSection = (PTEST)->ReturnCritical();\
       
    51 						if (pSection) pSection->Wait();\
       
    52 						(PTEST)->INFO_PRINTF1((P1));\
       
    53 						if (pSection) pSection->Signal();\
       
    54 					}
       
    55 						
       
    56 
       
    57 
       
    58 #endif