kerneltest/e32test/usbho/t_otgdi/inc/debugmacros.h
author Mike Kinghan <mikek@symbian.org>
Tue, 16 Nov 2010 14:39:21 +0000
branchGCC_SURGE
changeset 303 9b85206a602c
parent 0 a41df078684a
child 253 d37db4dcc88d
permissions -rw-r--r--
We need a way to pass flags to rombuilds in Raptor via extension flm interfaces, so that the CPP pass of the rom input files can be informed what toolchain we are building with and conditionally include or exclude files depending on whether the toolchain could build them.

// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// @internalComponent
// Collection of utility functions primarily assisting debuggers and maintainers.
// 
//

#ifndef DEBUGMACROS_H
#define DEBUGMACROS_H

#include <e32debug.h> // RDebug class
#include "testengine.h"

/**
Debug macro for serial port logging of function names and signatures
 e.g. 
<Function> void CMyClass::MyFunction (TInt aParam)
*/
#define LOG_FUNC 	if (gVerboseOutput) RDebug::Printf("<Function> %s", __PRETTY_FUNCTION__);

const TInt KErrAssertionInternal	= 3;

#define TEST_ASSERTION(a,b) 	if (!(a)) {test.Printf(_L("ASSERTION FAILED!\n line %d file %S.\n"), \
									__LINE__, __FILE__); test.Printf(b); \
									__ASSERT_ALWAYS(a, User::Panic(_L("Test F/W Err"), KErrAssertionInternal));};


#define LOG_FUNCERROR(a) RDebug::Printf("[WARNING %s failed %d]", __PRETTY_FUNCTION__, a);

/**
Debug macro to output test in 'verbose' detail mode
*/
#define LOG_VERBOSE1(a) if (gVerboseOutput) test.Printf(a);
#define LOG_VERBOSE2(a,b) if (gVerboseOutput) test.Printf(a, b);
#define LOG_VERBOSE3(a,b,c) if (gVerboseOutput) test.Printf(a, b, c);

#define LOG_STEPNAME(a) PrintStepName(a); 

/**
 Panic the framework
*
#define PANIC_FRAMEWORK(a) RDebug::Printf("<Framework died '%s' %d %s",\
    a, __LINE__, __FILE__); User::Panic(_LIT("Test F/W"), KErrUnknown);
*/	


#endif // DEBUGMACROS_H