-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
#include <dhcpsrv/testutils/config_result_check.h>
#include <boost/foreach.hpp>
+#include <boost/scoped_ptr.hpp>
#include <gtest/gtest.h>
using namespace std;
/// @brief Tests construction of D2CfgMgr
/// This test verifies that a D2CfgMgr constructs properly.
TEST(D2CfgMgr, construction) {
- D2CfgMgr *cfg_mgr = NULL;
+ boost::scoped_ptr<D2CfgMgr> cfg_mgr;
// Verify that configuration manager constructions without error.
- ASSERT_NO_THROW(cfg_mgr = new D2CfgMgr());
+ ASSERT_NO_THROW(cfg_mgr.reset(new D2CfgMgr()));
// Verify that the context can be retrieved and is not null.
D2CfgContextPtr context;
EXPECT_TRUE(context->getReverseMgr());
// Verify that the manager can be destructed without error.
- EXPECT_NO_THROW(delete cfg_mgr);
+ EXPECT_NO_THROW(cfg_mgr.reset());
}
/// @brief Tests the parsing of a complete, valid DHCP-DDNS configuration.