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

Method SetUp

core/port_test.cc:75–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73class PortTest : public ::testing::Test {
74 protected:
75 virtual void SetUp() {
76 DummyPort::set_initialized(false);
77
78 PortBuilder::all_port_builders_holder(true);
79 ASSERT_TRUE(PortBuilder::all_port_builders().empty());
80
81 ADD_DRIVER(DummyPort, "dummy_port", "dummy help");
82 ASSERT_TRUE(__driver__DummyPort);
83
84 ASSERT_EQ(1, PortBuilder::all_port_builders().size());
85 ASSERT_EQ(1, PortBuilder::all_port_builders().count("DummyPort"));
86 dummy_port_builder =
87 &PortBuilder::all_port_builders().find("DummyPort")->second;
88 EXPECT_EQ("DummyPort", dummy_port_builder->class_name());
89 EXPECT_EQ("dummy_port", dummy_port_builder->name_template());
90 EXPECT_EQ("dummy help", dummy_port_builder->help_text());
91 }
92
93 virtual void TearDown() {
94 PortBuilder::all_port_builders_holder(true);

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected