aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2020-11-29 19:33:22 +0100
committerFabian Jahr <fjahr@protonmail.com>2020-12-01 18:36:39 +0100
commit1e62350ca20898189904a88dfef9ea11ddcd8626 (patch)
tree4c59267f85c5691faa84656cb0cecb0d386a247e /src/test
parentc502a6dbfb854ca827a5a3925394f9e09d29b898 (diff)
refactor: Improve use of explicit keyword
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/signature_checker.cpp2
-rw-r--r--src/test/util/logging.h2
-rw-r--r--src/test/util_tests.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/test/fuzz/signature_checker.cpp b/src/test/fuzz/signature_checker.cpp
index e121c89665..970452dbcc 100644
--- a/src/test/fuzz/signature_checker.cpp
+++ b/src/test/fuzz/signature_checker.cpp
@@ -24,7 +24,7 @@ class FuzzedSignatureChecker : public BaseSignatureChecker
FuzzedDataProvider& m_fuzzed_data_provider;
public:
- FuzzedSignatureChecker(FuzzedDataProvider& fuzzed_data_provider) : m_fuzzed_data_provider(fuzzed_data_provider)
+ explicit FuzzedSignatureChecker(FuzzedDataProvider& fuzzed_data_provider) : m_fuzzed_data_provider(fuzzed_data_provider)
{
}
diff --git a/src/test/util/logging.h b/src/test/util/logging.h
index 1fcf7ca305..a49f9a7292 100644
--- a/src/test/util/logging.h
+++ b/src/test/util/logging.h
@@ -32,7 +32,7 @@ class DebugLogHelper
void check_found();
public:
- DebugLogHelper(std::string message, MatchFn match = [](const std::string*){ return true; });
+ explicit DebugLogHelper(std::string message, MatchFn match = [](const std::string*){ return true; });
~DebugLogHelper() { check_found(); }
};
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 36fa1a0299..131508f5f8 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -231,7 +231,7 @@ public:
Optional<std::vector<std::string>> list_value;
const char* error = nullptr;
- Expect(util::SettingsValue s) : setting(std::move(s)) {}
+ explicit Expect(util::SettingsValue s) : setting(std::move(s)) {}
Expect& DefaultString() { default_string = true; return *this; }
Expect& DefaultInt() { default_int = true; return *this; }
Expect& DefaultBool() { default_bool = true; return *this; }