LCOV - code coverage report
Current view: top level - testing/char_strings - test_enable_disable.c (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 11 11 100.0 %
Date: 2018-01-08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* Copyright 2017 noseglasses <shinynoseglasses@gmail.com>
       2             :  *
       3             :  * This program is free software: you can redistribute it and/or modify
       4             :  * it under the terms of the GNU Lesser General Public License as published by
       5             :  * the Free Software Foundation, either version 3 of the License, or
       6             :  * (at your option) any later version.
       7             :  *
       8             :  * This program is distributed in the hope that it will be useful,
       9             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      10             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      11             :  * GNU Lesser General Public License for more details.
      12             :  *
      13             :  * You should have received a copy of the GNU Lesser General Public License
      14             :  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
      15             :  */
      16             : 
      17             : #include "papageno_char_strings.h"
      18             :    
      19             : enum {
      20             :    ppg_cs_layer_0 = 0
      21             : };
      22             : 
      23           1 : PPG_CS_START_TEST
      24             : 
      25           1 :    PPG_CS_REGISTER_ACTION(Action)
      26             :    
      27           1 :    ppg_pattern(
      28             :       ppg_cs_layer_0, /* Layer id */
      29           1 :       PPG_TOKENS(
      30             :          PPG_CS_N('a'),
      31             :          PPG_CS_N('b'),
      32             :          ppg_token_set_action(
      33             :             PPG_CS_N('c'),
      34             :             PPG_CS_ACTION(Action)
      35             :          )
      36             :       )
      37             :    );
      38             :    
      39           1 :    ppg_cs_compile();
      40             :    
      41           1 :    PPG_CS_PROCESS_ON_OFF(  "a b c", 
      42             :                            PPG_CS_EXPECT_EMPTY_FLUSH
      43             :                            PPG_CS_EXPECT_NO_EXCEPTIONS
      44             :                            PPG_CS_EXPECT_ACTION_SERIES(
      45             :                               PPG_CS_A(Action)
      46             :                            )
      47             :    );
      48             :    
      49             : //    PPG_PATTERN_PRINT_TREE
      50             :    
      51           1 :    ppg_global_set_enabled(false);
      52             :    
      53           1 :    PPG_CS_PROCESS_ON_OFF(  "a b c", 
      54             :                            PPG_CS_EXPECT_EMPTY_FLUSH
      55             :                            PPG_CS_EXPECT_NO_EXCEPTIONS
      56             :                            PPG_CS_EXPECT_NO_ACTIONS
      57             :    );
      58             :    
      59             : //    PPG_PATTERN_PRINT_TREE
      60             :    
      61           1 :    ppg_global_set_enabled(true);
      62             :    
      63           1 :    PPG_CS_PROCESS_ON_OFF(  "a b c", 
      64             :                            PPG_CS_EXPECT_EMPTY_FLUSH
      65             :                            PPG_CS_EXPECT_NO_EXCEPTIONS
      66             :                            PPG_CS_EXPECT_ACTION_SERIES(
      67             :                               PPG_CS_A(Action)
      68             :                            )
      69             :    );
      70             :    
      71             : //    PPG_PATTERN_PRINT_TREE
      72             :    
      73           1 : PPG_CS_END_TEST

Generated by: LCOV version 1.10