MCPcopy Create free account
hub / github.com/baidu/babylon / TEST_F

Function TEST_F

test/test_application_context.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26size_t ApplicationContextTest::initialize_times;
27
28TEST_F(ApplicationContextTest, get_component_after_register) {
29 ASSERT_FALSE(context.component_accessor<::std::string>());
30 context.register_component(DefaultComponentHolder<::std::string>::create());
31 ASSERT_TRUE(context.component_accessor<::std::string>());
32 for (auto& holder : context) {
33 ASSERT_EQ(&::babylon::TypeId<::std::string>::ID, holder.type_id());
34 ASSERT_EQ(1, holder.accessible_path_number());
35 }
36}
37
38TEST_F(ApplicationContextTest,
39 component_with_same_type_is_ambiguous_to_get_by_type) {

Callers

nothing calls this directly

Calls 13

register_componentMethod · 0.80
type_idMethod · 0.80
assignMethod · 0.80
set_optionMethod · 0.80
get_or_createMethod · 0.80
nameMethod · 0.45
createMethod · 0.45
clearMethod · 0.45
getMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected