scenario_simulator_v2 C++ API
Classes | Typedefs | Functions
test_traffic_light.cpp File Reference
#include <gtest/gtest.h>
#include <ament_index_cpp/get_package_share_directory.hpp>
#include <boost/lexical_cast.hpp>
#include <regex>
#include <scenario_simulator_exception/exception.hpp>
#include <traffic_simulator/traffic_lights/traffic_light.hpp>
Include dependency graph for test_traffic_light.cpp:

Classes

class  TrafficLightTest
 

Typedefs

using TrafficLight = traffic_simulator::TrafficLight
 
using Color = TrafficLight::Color
 
using Status = TrafficLight::Status
 
using Shape = TrafficLight::Shape
 
using Bulb = TrafficLight::Bulb
 

Functions

int main (int argc, char **argv)
 
 TEST (Color, Color)
 
 TEST (Color, make)
 
 TEST (Color, make_wrong)
 
 TEST (Status, Status)
 
 TEST (Status, make)
 
 TEST (Status, make_wrong)
 
 TEST (Shape, Shape)
 
 TEST (Shape, make)
 
 TEST (Shape, make_wrong)
 
 TEST (Bulb, hash)
 
 TEST (Bulb, is)
 
 TEST (Bulb, make)
 
 TEST (Bulb, make_wrong)
 
 TEST (Bulb, operator_TrafficLight)
 
 TEST_F (TrafficLightTest, contains_colorStatusShape)
 
 TEST_F (TrafficLightTest, set_valid)
 

Typedef Documentation

◆ Bulb

◆ Color

◆ Shape

◆ Status

◆ TrafficLight

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST() [1/14]

TEST ( Bulb  ,
hash   
)
Note
Test hashing function. An object must be assigned the same hash every time.

◆ TEST() [2/14]

TEST ( Bulb  ,
is   
)
Note
Test basic functionality. Test Bulb comparisons with different configurations.

◆ TEST() [3/14]

TEST ( Bulb  ,
make   
)
Note
Test basic functionality. Test whether the function creates Bulb object appropriate to the argument.

◆ TEST() [4/14]

TEST ( Bulb  ,
make_wrong   
)
Note
Test basic functionality. Test function behavior when called with invalid name.

◆ TEST() [5/14]

TEST ( Bulb  ,
operator_TrafficLight   
)
Note
Test basic functionality. Test whether the TrafficLight message is constructed configured according to the Bulb object.

◆ TEST() [6/14]

TEST ( Color  ,
Color   
)
Note
Test object creation correctness.

◆ TEST() [7/14]

TEST ( Color  ,
make   
)
Note
Test basic functionality. Test whether the function creates Color object appropriate to the argument.

◆ TEST() [8/14]

TEST ( Color  ,
make_wrong   
)
Note
Test basic functionality. Test function behavior when called with invalid name.

◆ TEST() [9/14]

TEST ( Shape  ,
make   
)
Note
Test basic functionality. Test whether the function creates Shape object appropriate to the argument.

◆ TEST() [10/14]

TEST ( Shape  ,
make_wrong   
)
Note
Test basic functionality. Test function behavior when called with invalid name.

◆ TEST() [11/14]

TEST ( Shape  ,
Shape   
)
Note
Test object creation correctness.

◆ TEST() [12/14]

TEST ( Status  ,
make   
)
Note
Test basic functionality. Test whether the function creates Status object appropriate to the argument.

◆ TEST() [13/14]

TEST ( Status  ,
make_wrong   
)
Note
Test basic functionality. Test function behavior when called with invalid name.

◆ TEST() [14/14]

TEST ( Status  ,
Status   
)
Note
Test object creation correctness.

◆ TEST_F() [1/2]

TEST_F ( TrafficLightTest  ,
contains_colorStatusShape   
)
Note
test if function correctly determines if a given bulb is in the bulbs vector, passing the Color, Status, Shape triple.

◆ TEST_F() [2/2]

TEST_F ( TrafficLightTest  ,
set_valid   
)
Note
Test function behavior with a valid string.