LCOV - code coverage report
Current view: top level - testing/char_strings - test_enable_disable_timeout.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_FLUSH("AaBbCc")
      43             :                            PPG_CS_EXPECT_EXCEPTIONS(PPG_CS_ET | PPG_CS_EMF)
      44             :                            PPG_CS_EXPECT_NO_ACTIONS
      45             :    );
      46             :    
      47           1 :    ppg_global_set_timeout_enabled(false);
      48             :    
      49           1 :    PPG_CS_PROCESS_ON_OFF(  "a b | c", 
      50             :                            PPG_CS_EXPECT_EMPTY_FLUSH
      51             :                            PPG_CS_EXPECT_NO_EXCEPTIONS
      52             :                            PPG_CS_EXPECT_ACTION_SERIES(
      53             :                               PPG_CS_A(Action)
      54             :                            )
      55             :    );
      56             :    
      57           1 :    ppg_global_set_timeout_enabled(true);
      58             :    
      59           1 :    PPG_CS_PROCESS_ON_OFF(  "a b | c |", 
      60             :                            PPG_CS_EXPECT_FLUSH("AaBbCc")
      61             :                            PPG_CS_EXPECT_EXCEPTIONS(PPG_CS_ET | PPG_CS_EMF)
      62             :                            PPG_CS_EXPECT_NO_ACTIONS
      63             :    );
      64             :    
      65           1 : PPG_CS_END_TEST

Generated by: LCOV version 1.10