2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#1860] constructor, destructor -> SetUp, TearDown

This commit is contained in:
Andrei Pavel
2021-05-18 15:26:57 +03:00
parent 0b4b7fd648
commit 2bfd451834
2 changed files with 10 additions and 4 deletions

View File

@@ -22,12 +22,15 @@ using namespace isc::util;
namespace {
struct OpaqueDataTupleLenientParsing : ::testing::Test {
OpaqueDataTupleLenientParsing() : previous_(Option::lenient_parsing_) {
void SetUp() final override {
// Retain the current setting for future restoration.
previous_ = Option::lenient_parsing_;
// Enable lenient parsing.
Option::lenient_parsing_ = true;
}
~OpaqueDataTupleLenientParsing() {
void TearDown() final override {
// Restore.
Option::lenient_parsing_ = previous_;
}

View File

@@ -19,12 +19,15 @@ using namespace isc::util;
namespace {
struct OptionVendorClassLenientParsing : ::testing::Test {
OptionVendorClassLenientParsing() : previous_(Option::lenient_parsing_) {
void SetUp() final override {
// Retain the current setting for future restoration.
previous_ = Option::lenient_parsing_;
// Enable lenient parsing.
Option::lenient_parsing_ = true;
}
~OptionVendorClassLenientParsing() {
void TearDown() final override {
// Restore.
Option::lenient_parsing_ = previous_;
}