glib/tsrc/glib_nonstif/src/log_manual1.c
author andy simpson <andrews@symbian.org>
Fri, 17 Sep 2010 17:50:04 +0100
branchRCL_3
changeset 61 b670675990af
parent 0 e4d67989cc36
permissions -rw-r--r--
Merge Bug 2603 and Bug 3123 plus move exports to rom/bld.inf

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "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: 
*
*/




// This is a manual test case. When the test case is executed, the getchar() atthe 
// end is not executed, because the fatal mask is set and g_log calls abort().

#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN

#include <stdio.h>
#include <string.h>
#include "glib.h"

#ifdef __SYMBIAN32__
#include "mrt2_glib2_test.h"
#endif /*__SYMBIAN32__*/


int main (int argc,char *argv[])
{
	#ifdef __SYMBIAN32__

	g_set_print_handler(mrtPrintHandler);
	#endif /*__SYMBIAN32__*/
	
	printf("The following test case will abort\n when u press the enter key\n");
	printf("If you see any other message after \nthis message, consider the test\ncase as failed\n");
	getchar();
	
	g_log_set_fatal_mask(NULL,G_LOG_LEVEL_MESSAGE);
	
	g_log(NULL,G_LOG_LEVEL_MESSAGE,"test message");
	
	g_print("log_manual1 failed");
	
	getchar();
}