MCPcopy Create free account
hub / github.com/NetSys/bess / TEST_F

Function TEST_F

core/module_test.cc:194–202  ·  view source on GitHub ↗

Check that module builders create modules correctly when given a name

Source from the content-addressed store, hash-verified

192
193// Check that module builders create modules correctly when given a name
194TEST_F(ModuleTester, CreateModuleWithName) {
195 pb_error_t perr;
196
197 ASSERT_NE(nullptr, create_acme("bar", &perr));
198 EXPECT_EQ(1, ModuleGraph::GetAllModules().size());
199 ASSERT_EQ(nullptr, create_acme("bar", &perr));
200 EXPECT_EQ(EEXIST, perr.code());
201 EXPECT_EQ(1, ModuleGraph::GetAllModules().count("bar"));
202}
203
204// Check that module builders create modules with generated names
205TEST_F(ModuleTester, CreateModuleGenerateName) {

Callers

nothing calls this directly

Calls 11

create_acmeFunction · 0.85
create_acme_with_taskFunction · 0.85
sizeMethod · 0.80
igateMethod · 0.80
children_overloadMethod · 0.80
SignalOverloadMethod · 0.80
SignalUnderloadMethod · 0.80
global_gate_indexMethod · 0.80
RunCommandMethod · 0.45
moduleMethod · 0.45
priorityMethod · 0.45

Tested by

no test coverage detected