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

Function TEST_F

Behavioral/State/StateCodingExercise.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 class Evaluate : public ::testing::Test {};
49
50 TEST_F(Evaluate, TestSuccess)
51 {
52 CombinationLock cl({1,2,3});
53 ASSERT_EQ("LOCKED", cl.status);
54
55 cl.enter_digit(1);
56 ASSERT_EQ("1", cl.status);
57
58 cl.enter_digit(2);
59 ASSERT_EQ("12", cl.status);
60
61 cl.enter_digit(3);
62 ASSERT_EQ("OPEN", cl.status);
63 }
64
65 TEST_F(Evaluate, TestFailure)
66 {

Callers

nothing calls this directly

Calls 1

enter_digitMethod · 0.80

Tested by

no test coverage detected