phonebookengines/contactsmodel/tsrc/testhelpers.h
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // under the terms of "Eclipse Public License v1.0"
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 // TestHelpers Test module
    14 * Description: 
    15 // 
    15 * TestHelpers Test module
    16 //
    16 *
       
    17 */
       
    18 
    17 
    19 
    18 
    20 
    19 #ifndef __TEST_HELPERS__
    21 #ifndef __TEST_HELPERS__
    20 #define __TEST_HELPERS__
    22 #define __TEST_HELPERS__
    21 
    23 
    24 
    26 
    25 #define PUSH(x) CleanupStack::PushL(x)
    27 #define PUSH(x) CleanupStack::PushL(x)
    26 #define POP(x)  CleanupStack::Pop(x)
    28 #define POP(x)  CleanupStack::Pop(x)
    27 #define POPD(x) CleanupStack::PopAndDestroy(x); x = NULL;
    29 #define POPD(x) CleanupStack::PopAndDestroy(x); x = NULL;
    28 
    30 
    29 // Logging macros //
    31 //////////// Logging macros ///////////////
    30 GLDEF_C RTest test(KTestName);
    32 GLDEF_C RTest test(KTestName);
    31 //int __NB_ERR;
    33 //int __NB_ERR;
    32 int __NB_failures = 0;
    34 int __NB_failures = 0;
    33 
    35 
    34 _LIT(KNBTestSmile, "\n{°±°}");
    36 _LIT(KNBTestSmile, "\n{°±°}");
    84 	if (leave)
    86 	if (leave)
    85 		User::Leave(aResult < 0 ? aResult : KErrUnknown);
    87 		User::Leave(aResult < 0 ? aResult : KErrUnknown);
    86 	else
    88 	else
    87 		++__NB_failures;
    89 		++__NB_failures;
    88 	}
    90 	}
    89 //
    91 ///////////////////////////////////////////////
    90 
    92 
    91 
    93 
    92 
    94 
    93 
    95 
    94 
    96