summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/tests/client_class_def_unittest.cc
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2015-11-16 19:27:16 +0100
committerThomas Markwalder <tmark@isc.org>2015-11-16 19:29:38 +0100
commitdd80413a61e11fda1cb41f7bfd62aeae56325a28 (patch)
tree71bdafb95d70fcc804c935e9c9c1666c25f5a127 /src/lib/dhcpsrv/tests/client_class_def_unittest.cc
parent[4096] ClientClassDef now stores CfgOption not OptionCollection (diff)
downloadkea-dd80413a61e11fda1cb41f7bfd62aeae56325a28.tar.xz
kea-dd80413a61e11fda1cb41f7bfd62aeae56325a28.zip
[4096] Added parsers for client class definitions
New Files: parsers/client_class_def_parser.cc parsers/client_class_def_parser.h tests/client_class_def_parser_unittest.cc src/lib/dhcpsrv/parsers/Makefile.am Added entries for new files Added EXTRA_DIST entries for several files that were missing. src/lib/dhcpsrv/parsers/dhcp_parsers.h Added typedef for OptionDataListParserPtr src/lib/dhcpsrv/tests/Makefile.am Added entries for new unitest file src/lib/dhcpsrv/tests/client_class_def_unittest.cc Fixed broken unit test TEST(ClientClassDef, cfgOptionBasics)
Diffstat (limited to 'src/lib/dhcpsrv/tests/client_class_def_unittest.cc')
-rw-r--r--src/lib/dhcpsrv/tests/client_class_def_unittest.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/dhcpsrv/tests/client_class_def_unittest.cc b/src/lib/dhcpsrv/tests/client_class_def_unittest.cc
index 8aaa713116..7770b3bb44 100644
--- a/src/lib/dhcpsrv/tests/client_class_def_unittest.cc
+++ b/src/lib/dhcpsrv/tests/client_class_def_unittest.cc
@@ -19,6 +19,9 @@
#include <gtest/gtest.h>
+/// @file client_class_def_unittest.cc Unit tests for client class storage
+/// classes.
+
using namespace std;
using namespace isc::dhcp;
using namespace isc::util;
@@ -35,7 +38,8 @@ TEST(ClientClassDef, construction) {
CfgOptionPtr cfg_option;
// Classes cannot have blank names
- ASSERT_THROW(cclass.reset(new ClientClassDef("", expr, cfg_option)), BadValue);
+ ASSERT_THROW(cclass.reset(new ClientClassDef("", expr, cfg_option)),
+ BadValue);
// Verify we can create a class with a name, expression, and no cfg_option
ASSERT_NO_THROW(cclass.reset(new ClientClassDef(name, expr)));
@@ -87,7 +91,7 @@ TEST(ClientClassDef, cfgOptionBasics) {
// Now make sure we can find all the options
OptionDescriptor opt_desc = class_options->get("dhcp4",17);
ASSERT_TRUE(opt_desc.option_);
- EXPECT_EQ(100, opt_desc.option_->getType());
+ EXPECT_EQ(17, opt_desc.option_->getType());
opt_desc = class_options->get("isc",101);
ASSERT_TRUE(opt_desc.option_);