mavtables  0.2.1
MAVLink router and firewall.
Functions | Variables
test_GoTo.cpp File Reference
#include <catch.hpp>
#include <fakeit.hpp>
#include "Action.hpp"
#include "Chain.hpp"
#include "GoTo.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_GoTo.cpp:

Go to the source code of this file.

Functions

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

Variables

auto ping = packet_v2::Packet(to_vector(PingV2()))
 
GoTo goto_ (chain)
 
Rulerule = goto_
 

Function Documentation

◆ goto_()

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

◆ TEST_CASE() [1/6]

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

Definition at line 37 of file test_GoTo.cpp.

References mock_shared().

Here is the call graph for this function:

◆ TEST_CASE() [2/6]

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

Definition at line 80 of file test_GoTo.cpp.

References mock_shared().

Here is the call graph for this function:

◆ TEST_CASE() [3/6]

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

Definition at line 125 of file test_GoTo.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 ( "GoTo's are printable (without a condition but with a priority)."  ,
""  [GoTo] 
)

Definition at line 243 of file test_GoTo.cpp.

References goto_, ping, and rule.

◆ TEST_CASE() [5/6]

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

Definition at line 261 of file test_GoTo.cpp.

References goto_, ping, and rule.

◆ TEST_CASE() [6/6]

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

Definition at line 304 of file test_GoTo.cpp.

Variable Documentation

◆ goto_

GoTo goto_(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_GoTo.cpp.

◆ rule

Rule& rule = goto_

Definition at line 231 of file test_GoTo.cpp.