mavtables  0.2.1
MAVLink router and firewall.
Functions | Variables
test_Call.cpp File Reference
#include <catch.hpp>
#include <fakeit.hpp>
#include "Action.hpp"
#include "Call.hpp"
#include "Chain.hpp"
#include "If.hpp"
#include "MAVAddress.hpp"
#include "Packet.hpp"
#include "PacketVersion1.hpp"
#include "PacketVersion2.hpp"
#include "Rule.hpp"
#include "utility.hpp"
#include "common.hpp"
#include "common_Packet.hpp"
#include "common_Rule.hpp"
Include dependency graph for test_Call.cpp:

Go to the source code of this file.

Functions

 TEST_CASE ("Call's are constructable.", "[Call]")
 
 TEST_CASE ("Call's are comparable.", "[Call]")
 
 TEST_CASE ("Call's 'action' method determines what to do with a " "packet/address combination.", "[Call]")
 
 TEST_CASE ("Call's are printable (without a condition but with a priority).", "[Call]")
 
 TEST_CASE ("Call's are printable (with a condition but without a priority).", "[Call]")
 
Call call (chain, -3, If().type("PING").from("192.168/8").to("172.16/4"))
 
 TEST_CASE ("Call's 'clone' method returns a polymorphic copy.", "[Call]")
 

Variables

auto ping = packet_v2::Packet(to_vector(PingV2()))
 
Call call (chain)
 
Rulerule = call
 

Function Documentation

◆ call()

Call call ( chain  ,
3,
If().type("PING").from("192.168/8").to("172.16/4")   
)

◆ TEST_CASE() [1/6]

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

Definition at line 37 of file test_Call.cpp.

References mock_shared().

Here is the call graph for this function:

◆ TEST_CASE() [2/6]

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

Definition at line 80 of file test_Call.cpp.

References mock_shared().

Here is the call graph for this function:

◆ TEST_CASE() [3/6]

TEST_CASE ( "Call's 'action' method determines what to do with a " "packet/address combination."  ,
""  [Call] 
)

Definition at line 125 of file test_Call.cpp.

References Action::make_accept(), Action::make_continue(), Action::make_default(), Action::make_reject(), mock_shared(), and ping.

Here is the call graph for this function:

◆ TEST_CASE() [4/6]

TEST_CASE ( "Call's are printable (without a condition but with a priority)."  ,
""  [Call] 
)

Definition at line 243 of file test_Call.cpp.

References call, ping, and rule.

◆ TEST_CASE() [5/6]

TEST_CASE ( "Call's are printable (with a condition but without a priority)."  ,
""  [Call] 
)

Definition at line 261 of file test_Call.cpp.

References call, ping, and rule.

◆ TEST_CASE() [6/6]

TEST_CASE ( "Call's 'clone' method returns a polymorphic copy."  ,
""  [Call] 
)

Definition at line 304 of file test_Call.cpp.

Variable Documentation

◆ call

Call call(chain, -3, If().type("PING").from("192.168/8").to("172.16/4")) ( chain  )

◆ ping

auto ping = packet_v2::Packet(to_vector(PingV2()))

Definition at line 229 of file test_Call.cpp.

◆ rule

Rule & rule = call

Definition at line 231 of file test_Call.cpp.