]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1860] constructor, destructor -> SetUp, TearDown
authorAndrei Pavel <andrei@isc.org>
Tue, 18 May 2021 12:26:57 +0000 (15:26 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 19 May 2021 12:59:03 +0000 (15:59 +0300)
src/lib/dhcp/tests/opaque_data_tuple_unittest.cc
src/lib/dhcp/tests/option_vendor_class_unittest.cc

index 0065e527ea0a28bfe3c3b88a8bb828300cce2db8..d065ec827f54e28fa2a7b2897fafbc43deecab7c 100644 (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_;
     }
index d78b40b23ced8ee2e4ba1c8bac0a4f07c26c2e72..bb0fc17948d20e9c8af067421ec029ca4e6e2008 100644 (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_;
     }