From: Francis Dupont Date: Tue, 10 Jul 2018 13:04:22 +0000 (+0200) Subject: [5685] Removed unused unit test X-Git-Tag: 66-authoritative-flag-in-kea_base~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cf2af27ed295e4b935ce2873a0ade5362e97e5c;p=thirdparty%2Fkea.git [5685] Removed unused unit test --- diff --git a/src/lib/dhcpsrv/tests/client_class_def_unittest.cc b/src/lib/dhcpsrv/tests/client_class_def_unittest.cc index e5f1c810bc..37fa7b5f19 100644 --- a/src/lib/dhcpsrv/tests/client_class_def_unittest.cc +++ b/src/lib/dhcpsrv/tests/client_class_def_unittest.cc @@ -226,65 +226,6 @@ TEST(ClientClassDef, copyAndEquality) { EXPECT_TRUE(*cclass != *cclass2); } -// Verifies assignment. -TEST(ClientClassDef, assign) { - - boost::scoped_ptr cclass; - ExpressionPtr expr; - CfgOptionPtr test_options; - OptionPtr opt; - - // Make an expression - expr.reset(new Expression()); - TokenPtr token(new TokenString("boo")); - expr->push_back(token); - - // Create an option container with an option - OptionPtr option; - test_options.reset(new CfgOption()); - option.reset(new Option(Option::V4, 17, OptionBuffer(10, 0xFF))); - ASSERT_NO_THROW(test_options->add(option, false, DHCP4_OPTION_SPACE)); - - // Now remake the client class with cfg_option - ASSERT_NO_THROW(cclass.reset(new ClientClassDef("class_one", expr, - test_options))); - - // Now lets assign a fresh definition to it; - boost::scoped_ptr cclass2; - ExpressionPtr expr_empty; - ASSERT_NO_THROW(cclass2.reset(new ClientClassDef("another", expr_empty))); - ASSERT_NO_THROW(*cclass2 = *cclass); - - // The allocated Expression pointers should match - EXPECT_TRUE(cclass->getMatchExpr().get() == - cclass2->getMatchExpr().get()); - - // The allocated CfgOption pointers should match - EXPECT_TRUE(cclass->getCfgOption().get() == - cclass2->getCfgOption().get()); - - // Verify the equality tools reflect that the classes are equal. - EXPECT_TRUE(cclass->equals(*cclass2)); - EXPECT_TRUE(*cclass == *cclass2); - EXPECT_FALSE(*cclass != *cclass2); - - // Verify the required flag is enough to make classes not equal. - EXPECT_FALSE(cclass->getRequired()); - cclass2->setRequired(true); - EXPECT_TRUE(cclass2->getRequired()); - EXPECT_FALSE(*cclass == *cclass2); - EXPECT_TRUE(*cclass != *cclass2); - cclass2->setRequired(false); - EXPECT_TRUE(*cclass == *cclass2); - - // Verify the depend on known flag is enough to make classes not equal. - EXPECT_FALSE(cclass->getDependOnKnown()); - cclass2->setDependOnKnown(true); - EXPECT_TRUE(cclass2->getDependOnKnown()); - EXPECT_FALSE(*cclass == *cclass2); - EXPECT_TRUE(*cclass != *cclass2); -} - // Tests dependency. TEST(ClientClassDef, dependency) { boost::scoped_ptr cclass;