From 76fa00abedac5f1399a88635ac7b96ecaa0dec42 Mon Sep 17 00:00:00 2001 From: Sean Hawkes Date: Sat, 18 Sep 2021 06:22:27 -0500 Subject: [PATCH] Added invocation of base class addOptions in derived to populate list with common and derived options, fixed errors with editor member variable type mismatch --- test/tools/IsolTestOptions.cpp | 3 ++- test/tools/IsolTestOptions.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/tools/IsolTestOptions.cpp b/test/tools/IsolTestOptions.cpp index bcbee4463..44cf90655 100644 --- a/test/tools/IsolTestOptions.cpp +++ b/test/tools/IsolTestOptions.cpp @@ -67,8 +67,9 @@ IsolTestOptions::IsolTestOptions(std::string* _editor): void IsolTestOptions::addOptions() { + CommonOptions::addOptions(); options.add_options() - ("editor", po::value(_editor)->default_value(editorPath()), "Path to editor for opening test files.") + ("editor", po::value(editor)->default_value(editorPath()), "Path to editor for opening test files.") ("help", po::bool_switch(&showHelp), "Show this help screen.") ("no-color", po::bool_switch(&noColor), "Don't use colors.") ("accept-updates", po::bool_switch(&acceptUpdates), "Automatically accept expectation updates.") diff --git a/test/tools/IsolTestOptions.h b/test/tools/IsolTestOptions.h index 4deb5f9aa..f889f5b8f 100644 --- a/test/tools/IsolTestOptions.h +++ b/test/tools/IsolTestOptions.h @@ -33,9 +33,9 @@ struct IsolTestOptions: CommonOptions bool noColor = false; bool acceptUpdates = false; std::string testFilter = std::string{}; - std::string editor = std::string{}; + std::string* editor = nullptr; - explicit IsolTestOptions(const std::string* _editor); + explicit IsolTestOptions(std::string* _editor); void addOptions() override; bool parse(int _argc, char const* const* _argv) override; void validate() const override;