// Copyright (C) 2011-2023 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 // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace isc; using namespace isc::dhcp; using namespace isc::util; using boost::scoped_ptr; namespace { /// @brief A class which derives from option and exposes protected members. class NakedOption : public Option { public: /// @brief Constructor /// /// Sets the universe and option type to arbitrary test values. NakedOption() : Option(Option::V6, 258) { } using Option::unpackOptions; using Option::cloneInternal; }; class OptionTest : public ::testing::Test { public: OptionTest(): buf_(255), outBuf_(255) { for (unsigned i = 0; i < 255; i++) { buf_[i] = 255 - i; } } OptionBuffer buf_; OutputBuffer outBuf_; }; // Basic tests for V4 functionality TEST_F(OptionTest, v4_basic) { scoped_ptr