mavtables  0.2.1
MAVLink router and firewall.
Functions | Variables
test_Chain.cpp File Reference
#include <memory>
#include <utility>
#include <vector>
#include <catch.hpp>
#include "Accept.hpp"
#include "Action.hpp"
#include "Call.hpp"
#include "Chain.hpp"
#include "GoTo.hpp"
#include "If.hpp"
#include "MAVAddress.hpp"
#include "Packet.hpp"
#include "PacketVersion1.hpp"
#include "PacketVersion2.hpp"
#include "RecursionError.hpp"
#include "Reject.hpp"
#include "utility.hpp"
#include "common_Packet.hpp"
Include dependency graph for test_Chain.cpp:

Go to the source code of this file.

Functions

 TEST_CASE ("Chain's are constructable.", "[Chain]")
 
 TEST_CASE ("Chain's are comparable.", "[Chain]")
 
 TEST_CASE ("Chain's 'append' method appends a new rule to the filter chain.", "[Chain]")
 
 TEST_CASE ("Chain's 'name' method returns the name of the chain.", "[Chain]")
 
 TEST_CASE ("Chain's are copyable.", "[Chain]")
 
 TEST_CASE ("Chain's are movable.", "[Chain]")
 
 TEST_CASE ("Chain's are assignable.", "[Chain]")
 
chain_a append (std::make_unique< Accept >(If().to("192.168")))
 
chain_a append (std::make_unique< Reject >())
 
 TEST_CASE ("Chain's 'action' method determines what to do with a packet with " " respect to a destination address.", "[Rule]")
 
 TEST_CASE ("Chain's are printable.", "[Chain]")
 

Variables

Chain chain_a_compare ("test_chain_a")
 
Chain chain_b ("test_chain_b")
 
Chain chain_b_compare ("test_chain_b")
 
 chain_a = std::move(chain_b)
 

Function Documentation

◆ append() [1/2]

chain_a_compare append ( std::make_unique< Accept If().to("192.168"))

◆ append() [2/2]

chain_b_compare append ( std::make_unique< Reject ())

◆ TEST_CASE() [1/9]

TEST_CASE ( "Chain's are constructable."  ,
""  [Chain] 
)

Definition at line 41 of file test_Chain.cpp.

◆ TEST_CASE() [2/9]

TEST_CASE ( "Chain's are comparable."  ,
""  [Chain] 
)

Definition at line 72 of file test_Chain.cpp.

◆ TEST_CASE() [3/9]

TEST_CASE ( "Chain's 'append' method appends a new rule to the filter chain."  ,
""  [Chain] 
)

Definition at line 122 of file test_Chain.cpp.

References Chain::append().

Here is the call graph for this function:

◆ TEST_CASE() [4/9]

TEST_CASE ( "Chain's 'name' method returns the name of the chain."  ,
""  [Chain] 
)

Definition at line 136 of file test_Chain.cpp.

◆ TEST_CASE() [5/9]

TEST_CASE ( "Chain's are copyable."  ,
""  [Chain] 
)

Definition at line 142 of file test_Chain.cpp.

References Chain::append().

Here is the call graph for this function:

◆ TEST_CASE() [6/9]

TEST_CASE ( "Chain's are movable."  ,
""  [Chain] 
)

Definition at line 155 of file test_Chain.cpp.

References Chain::append().

Here is the call graph for this function:

◆ TEST_CASE() [7/9]

TEST_CASE ( "Chain's are assignable."  ,
""  [Chain] 
)

Definition at line 168 of file test_Chain.cpp.

References Chain::append(), chain_a, chain_a_compare, chain_b, and chain_b_compare.

Here is the call graph for this function:

◆ TEST_CASE() [8/9]

TEST_CASE ( "Chain's 'action' method determines what to do with a packet with " " respect to a destination address."  ,
""  [Rule] 
)

Definition at line 204 of file test_Chain.cpp.

References logger::heartbeat(), and ping.

Here is the call graph for this function:

◆ TEST_CASE() [9/9]

TEST_CASE ( "Chain's are printable."  ,
""  [Chain] 
)

Definition at line 256 of file test_Chain.cpp.

Variable Documentation

◆ chain_a

chain_a = std::move(chain_b)

Definition at line 199 of file test_Chain.cpp.

◆ chain_a_compare

Chain chain_a_compare("test_chain_a")

◆ chain_b

Chain chain_b("test_chain_b")

◆ chain_b_compare

Chain chain_b_compare("test_chain_b")