mavtables  0.2.1
MAVLink router and firewall.
Functions
test_config_grammar.cpp File Reference
#include <sstream>
#include <catch.hpp>
#include <fakeit.hpp>
#include <pegtl.hpp>
#include "config_grammar.hpp"
#include "utility.hpp"
#include "common.hpp"
Include dependency graph for test_config_grammar.cpp:

Go to the source code of this file.

Functions

 TEST_CASE ("A configuration string must have at least one valid statement " "or block.", "[config]")
 
 TEST_CASE ("Global statements.", "[config]")
 
 TEST_CASE ("Parse global 'default_action' statement.", "[config]")
 
 TEST_CASE ("UDP configuration block.", "[config]")
 
 TEST_CASE ("UDP port setting.", "[config]")
 
 TEST_CASE ("UDP IP address setting.", "[config]")
 
 TEST_CASE ("UDP max_bitrate setting.", "[config]")
 
 TEST_CASE ("Serial port configuration block.", "[config]")
 
 TEST_CASE ("Serial port device setting.", "[config]")
 
 TEST_CASE ("Serial port baud rate setting.", "[config]")
 
 TEST_CASE ("Serial port flow control setting.", "[config]")
 
 TEST_CASE ("Serial address preload.", "[config]")
 
 TEST_CASE ("Chain block.", "[config]")
 
 TEST_CASE ("Invalid rule.", "[config]")
 
 TEST_CASE ("Accept rule.", "[config]")
 
 TEST_CASE ("Reject rule.", "[config]")
 
 TEST_CASE ("Call rule.", "[config]")
 
 TEST_CASE ("GoTo rule.", "[config]")
 
 TEST_CASE ("Condition.", "[config]")
 
 TEST_CASE ("Packet type condition.", "[config]")
 
 TEST_CASE ("Source condition.", "[config]")
 
 TEST_CASE ("Destination condition.", "[config]")
 
 TEST_CASE ("Priority.", "[config]")
 
 TEST_CASE ("Rule combinations with 'accept'.", "[config]")
 
 TEST_CASE ("Rule combinations with 'reject'.", "[config]")
 
 TEST_CASE ("Rule combinations with 'call'.", "[config]")
 
 TEST_CASE ("Rule combinations with 'goto'.", "[config]")
 
 TEST_CASE ("'print_node' method prints an abstract syntax tree.", "[config]")
 

Function Documentation

◆ TEST_CASE() [1/28]

TEST_CASE ( "A configuration string must have at least one valid statement " "or block."  ,
""  [config] 
)

Definition at line 30 of file test_config_grammar.cpp.

References config::parse().

Here is the call graph for this function:

◆ TEST_CASE() [2/28]

TEST_CASE ( "Global statements."  ,
""  [config] 
)

Definition at line 41 of file test_config_grammar.cpp.

◆ TEST_CASE() [3/28]

TEST_CASE ( "Parse global 'default_action' statement."  ,
""  [config] 
)

Definition at line 61 of file test_config_grammar.cpp.

◆ TEST_CASE() [4/28]

TEST_CASE ( "UDP configuration block."  ,
""  [config] 
)

Definition at line 128 of file test_config_grammar.cpp.

◆ TEST_CASE() [5/28]

TEST_CASE ( "UDP port setting."  ,
""  [config] 
)

Definition at line 197 of file test_config_grammar.cpp.

◆ TEST_CASE() [6/28]

TEST_CASE ( "UDP IP address setting."  ,
""  [config] 
)

Definition at line 259 of file test_config_grammar.cpp.

◆ TEST_CASE() [7/28]

TEST_CASE ( "UDP max_bitrate setting."  ,
""  [config] 
)

Definition at line 402 of file test_config_grammar.cpp.

◆ TEST_CASE() [8/28]

TEST_CASE ( "Serial port configuration block."  ,
""  [config] 
)

Definition at line 464 of file test_config_grammar.cpp.

◆ TEST_CASE() [9/28]

TEST_CASE ( "Serial port device setting."  ,
""  [config] 
)

Definition at line 534 of file test_config_grammar.cpp.

◆ TEST_CASE() [10/28]

TEST_CASE ( "Serial port baud rate setting."  ,
""  [config] 
)

Definition at line 624 of file test_config_grammar.cpp.

◆ TEST_CASE() [11/28]

TEST_CASE ( "Serial port flow control setting."  ,
""  [config] 
)

Definition at line 688 of file test_config_grammar.cpp.

◆ TEST_CASE() [12/28]

TEST_CASE ( "Serial address preload."  ,
""  [config] 
)

Definition at line 778 of file test_config_grammar.cpp.

◆ TEST_CASE() [13/28]

TEST_CASE ( "Chain block."  ,
""  [config] 
)

Definition at line 857 of file test_config_grammar.cpp.

◆ TEST_CASE() [14/28]

TEST_CASE ( "Invalid rule."  ,
""  [config] 
)

Definition at line 941 of file test_config_grammar.cpp.

◆ TEST_CASE() [15/28]

TEST_CASE ( "Accept rule."  ,
""  [config] 
)

Definition at line 957 of file test_config_grammar.cpp.

◆ TEST_CASE() [16/28]

TEST_CASE ( "Reject rule."  ,
""  [config] 
)

Definition at line 999 of file test_config_grammar.cpp.

◆ TEST_CASE() [17/28]

TEST_CASE ( "Call rule."  ,
""  [config] 
)

Definition at line 1041 of file test_config_grammar.cpp.

◆ TEST_CASE() [18/28]

TEST_CASE ( "GoTo rule."  ,
""  [config] 
)

Definition at line 1105 of file test_config_grammar.cpp.

◆ TEST_CASE() [19/28]

TEST_CASE ( "Condition."  ,
""  [config] 
)

Definition at line 1169 of file test_config_grammar.cpp.

◆ TEST_CASE() [20/28]

TEST_CASE ( "Packet type condition."  ,
""  [config] 
)

Definition at line 1185 of file test_config_grammar.cpp.

◆ TEST_CASE() [21/28]

TEST_CASE ( "Source condition."  ,
""  [config] 
)

Definition at line 1257 of file test_config_grammar.cpp.

◆ TEST_CASE() [22/28]

TEST_CASE ( "Destination condition."  ,
""  [config] 
)

Definition at line 1426 of file test_config_grammar.cpp.

◆ TEST_CASE() [23/28]

TEST_CASE ( "Priority."  ,
""  [config] 
)

Definition at line 1595 of file test_config_grammar.cpp.

◆ TEST_CASE() [24/28]

TEST_CASE ( "Rule combinations with 'accept'."  ,
""  [config] 
)

Definition at line 1718 of file test_config_grammar.cpp.

◆ TEST_CASE() [25/28]

TEST_CASE ( "Rule combinations with 'reject'."  ,
""  [config] 
)

Definition at line 1979 of file test_config_grammar.cpp.

◆ TEST_CASE() [26/28]

TEST_CASE ( "Rule combinations with 'call'."  ,
""  [config] 
)

Definition at line 2240 of file test_config_grammar.cpp.

◆ TEST_CASE() [27/28]

TEST_CASE ( "Rule combinations with 'goto'."  ,
""  [config] 
)

Definition at line 2502 of file test_config_grammar.cpp.

◆ TEST_CASE() [28/28]

TEST_CASE ( "'print_node' method prints an abstract syntax tree."  ,
""  [config] 
)

Definition at line 2764 of file test_config_grammar.cpp.