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

Function TestTwoWayEnter

libs/routing/routing_tests/cross_mwm_connector_test.cpp:110–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109template <typename CrossMwmId>
110void TestTwoWayEnter(CrossMwmId const & crossMwmId)
111{
112 uint32_t constexpr featureId = 1;
113 uint32_t constexpr segmentIdx = 1;
114
115 CrossMwmBuilderTestFixture<CrossMwmId> test;
116 test.builder.AddTransition(crossMwmId, featureId, segmentIdx, false /* oneWay */, true /* forwardIsEnter */);
117
118 TestConnectorConsistency(test.connector);
119 TEST_EQUAL(test.connector.GetNumEnters(), 1, ());
120 TEST_EQUAL(test.connector.GetNumExits(), 1, ());
121 TEST(!test.connector.IsTransition(Segment(kTestMwmId, featureId, segmentIdx, true /* forward */),
122 true /* isOutgoing */),
123 ());
124 TEST(test.connector.IsTransition(Segment(kTestMwmId, featureId, segmentIdx, true /* forward */),
125 false /* isOutgoing */),
126 ());
127 TEST(test.connector.IsTransition(Segment(kTestMwmId, featureId, segmentIdx, false /* forward */),
128 true /* isOutgoing */),
129 ());
130 TEST(!test.connector.IsTransition(Segment(kTestMwmId, featureId, segmentIdx, false /* forward */),
131 false /* isOutgoing */),
132 ());
133}
134
135template <typename CrossMwmId>
136void TestTwoWayExit(CrossMwmId const & crossMwmId)

Callers 1

UNIT_TESTFunction · 0.85

Calls 7

TestConnectorConsistencyFunction · 0.85
TESTFunction · 0.85
SegmentClass · 0.50
AddTransitionMethod · 0.45
GetNumEntersMethod · 0.45
GetNumExitsMethod · 0.45
IsTransitionMethod · 0.45

Tested by

no test coverage detected