MCPcopy Create free account
hub / github.com/Apress/design-patterns-in-modern-cpp / TEST_F

Function TEST_F

Structural/Proxy/ProxyCodingExercise.cpp:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 };
67
68 TEST_F(Evaluate, BaselineTest)
69 {
70 Person p{10};
71 ResponsiblePerson rp{p};
72
73 ASSERT_EQ("too young", rp.drive());
74 ASSERT_EQ("too young", rp.drink());
75 ASSERT_EQ("dead", rp.drink_and_drive());
76
77 rp.set_age(20);
78
79 ASSERT_EQ("driving", rp.drive());
80 ASSERT_EQ("drinking", rp.drink());
81 ASSERT_EQ("dead", rp.drink_and_drive());
82 }
83
84} // namespace
85

Callers

nothing calls this directly

Calls 4

driveMethod · 0.45
drinkMethod · 0.45
drink_and_driveMethod · 0.45
set_ageMethod · 0.45

Tested by

no test coverage detected