test/error_test.cc
changeset 487 afd134142111
parent 223 cfadfeef706f
child 440 88ed40ad0d4f
equal deleted inserted replaced
5:8e050390707b 6:7749e7ec58a2
    45 
    45 
    46 void assertion_text_disable() {
    46 void assertion_text_disable() {
    47   LEMON_ASSERT(false, "This is a fault message");
    47   LEMON_ASSERT(false, "This is a fault message");
    48 }
    48 }
    49 
    49 
    50 void fixme_disable() {
       
    51   LEMON_FIXME("fixme_disable() is fixme!");
       
    52 }
       
    53 
       
    54 void check_assertion_disable() {
    50 void check_assertion_disable() {
    55   no_assertion_text_disable();
    51   no_assertion_text_disable();
    56   assertion_text_disable();
    52   assertion_text_disable();
    57   fixme_disable();
       
    58 }
    53 }
    59 #undef LEMON_DISABLE_ASSERTS
    54 #undef LEMON_DISABLE_ASSERTS
    60 
    55 
    61 //checking custom assert handler
    56 //checking custom assert handler
    62 #define LEMON_ASSERT_CUSTOM
    57 #define LEMON_ASSERT_CUSTOM
    76 
    71 
    77 void assertion_text_custom() {
    72 void assertion_text_custom() {
    78   LEMON_ASSERT(false, "This is a fault message");
    73   LEMON_ASSERT(false, "This is a fault message");
    79 }
    74 }
    80 
    75 
    81 void fixme_custom() {
       
    82   LEMON_FIXME("fixme_custom() is fixme!");
       
    83 }
       
    84 
       
    85 void check_assertion_custom() {
    76 void check_assertion_custom() {
    86   no_assertion_text_custom();
    77   no_assertion_text_custom();
    87   assertion_text_custom();
    78   assertion_text_custom();
    88   fixme_custom();
    79   check(cnt == 1, "The custom assert handler does not work");
    89   check(cnt == 2, "The custom assert handler does not work");
       
    90 }
    80 }
    91 
    81 
    92 #undef LEMON_ASSERT_CUSTOM
    82 #undef LEMON_ASSERT_CUSTOM
    93 
    83 
    94 
    84