MCPcopy Create free account
hub / github.com/comaps/comaps / Checker

Function Checker

libs/routing/routing_tests/routing_options_tests.cpp:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void Checker(std::vector<RoutingOptions::Road> const & include)
36{
37 RoutingOptions options = CreateOptions(include);
38
39 for (auto type : include)
40 TEST(options.Has(type), ());
41
42 auto max = static_cast<RoadType>(RoutingOptions::Road::Max);
43 for (uint8_t i = 1; i < max; i <<= 1)
44 {
45 bool hasInclude = false;
46 auto type = static_cast<RoutingOptions::Road>(i);
47 for (auto has : include)
48 hasInclude |= (type == has);
49
50 if (!hasInclude)
51 TEST(!options.Has(static_cast<RoutingOptions::Road>(i)), ());
52 }
53}
54
55UNIT_TEST(RoutingOptionTest)
56{

Callers 1

UNIT_TESTFunction · 0.70

Calls 3

CreateOptionsFunction · 0.85
TESTFunction · 0.85
HasMethod · 0.45

Tested by

no test coverage detected