MCPcopy Create free account
hub / github.com/cucumber/cucumber-cpp / TEST_F

Function TEST_F

tests/unit/ContextManagerTest.cpp:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25class Context2 {};
26
27TEST_F(ContextManagerTest, createsValidContextPointers) {
28 std::weak_ptr<Context1> ctx1 = contextManager.addContext<Context1>();
29 ASSERT_EQ(1, contextManager.countContexts());
30 ASSERT_FALSE(ctx1.expired());
31 std::weak_ptr<Context2> ctx2 = contextManager.addContext<Context2>();
32 ASSERT_EQ(2, contextManager.countContexts());
33 ASSERT_FALSE(ctx2.expired());
34}
35
36TEST_F(ContextManagerTest, allowsCreatingTheSameContextTypeTwice) {
37 std::weak_ptr<Context1> ctx1 = contextManager.addContext<Context1>();

Callers

nothing calls this directly

Calls 2

countContextsMethod · 0.80
purgeContextsMethod · 0.80

Tested by

no test coverage detected