glib/tsrc/glib_nonstif/src/log_manual1.c
branchRCL_3
changeset 57 2efc27d87e1c
parent 0 e4d67989cc36
equal deleted inserted replaced
56:acd3cd4aaceb 57:2efc27d87e1c
       
     1 /*
       
     2 * Copyright (c) 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 "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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // This is a manual test case. When the test case is executed, the getchar() atthe 
       
    22 // end is not executed, because the fatal mask is set and g_log calls abort().
       
    23 
       
    24 #undef G_DISABLE_ASSERT
       
    25 #undef G_LOG_DOMAIN
       
    26 
       
    27 #include <stdio.h>
       
    28 #include <string.h>
       
    29 #include "glib.h"
       
    30 
       
    31 #ifdef __SYMBIAN32__
       
    32 #include "mrt2_glib2_test.h"
       
    33 #endif /*__SYMBIAN32__*/
       
    34 
       
    35 
       
    36 int main (int argc,char *argv[])
       
    37 {
       
    38 	#ifdef __SYMBIAN32__
       
    39 
       
    40 	g_set_print_handler(mrtPrintHandler);
       
    41 	#endif /*__SYMBIAN32__*/
       
    42 	
       
    43 	printf("The following test case will abort\n when u press the enter key\n");
       
    44 	printf("If you see any other message after \nthis message, consider the test\ncase as failed\n");
       
    45 	getchar();
       
    46 	
       
    47 	g_log_set_fatal_mask(NULL,G_LOG_LEVEL_MESSAGE);
       
    48 	
       
    49 	g_log(NULL,G_LOG_LEVEL_MESSAGE,"test message");
       
    50 	
       
    51 	g_print("log_manual1 failed");
       
    52 	
       
    53 	getchar();
       
    54 }