Update contrib.
1 // Copyright (c) 2007-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
15 // Collection of utility functions primarily assisting debuggers and maintainers.
22 #include <e32debug.h> // RDebug class
23 #include "testengine.h"
26 Debug macro for serial port logging of function names and signatures
28 <Function> void CMyClass::MyFunction (TInt aParam)
30 #define LOG_FUNC if (gVerboseOutput) RDebug::Printf("<Function> %s", __PRETTY_FUNCTION__);
32 const TInt KErrAssertionInternal = 3;
34 #define TEST_ASSERTION(a,b) if (!(a)) {test.Printf(_L("ASSERTION FAILED!\n line %d file %S.\n"), \
35 __LINE__, __FILE__); test.Printf(b); \
36 __ASSERT_ALWAYS(a, User::Panic(_L("Test F/W Err"), KErrAssertionInternal));};
39 #define LOG_FUNCERROR(a) RDebug::Printf("[WARNING %s failed %d]", __PRETTY_FUNCTION__, a);
42 Debug macro to output test in 'verbose' detail mode
44 #define LOG_VERBOSE1(a) if (gVerboseOutput) test.Printf(a);
45 #define LOG_VERBOSE2(a,b) if (gVerboseOutput) test.Printf(a, b);
46 #define LOG_VERBOSE3(a,b,c) if (gVerboseOutput) test.Printf(a, b, c);
48 #define LOG_STEPNAME(a) PrintStepName(a);
53 #define PANIC_FRAMEWORK(a) RDebug::Printf("<Framework died '%s' %d %s",\
54 a, __LINE__, __FILE__); User::Panic(_LIT("Test F/W"), KErrUnknown);
58 #endif // DEBUGMACROS_H