diff options
author | Gereon Kremer <nafur42@gmail.com> | 2021-08-23 12:11:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 19:11:13 +0000 |
commit | c94008073d2b9ddec19ca9713d0c30eb41777eb6 (patch) | |
tree | ecc6e4119f1a82518714fed36accb89084145b83 /test | |
parent | b9fd9a24da615fab9e23a5a48fbad023150bef61 (diff) |
Move options parsing code to main (#7054)
This PR moves the code responsible for parsing the command line to the main folder. Note that the options themselves, and converting strings to the options proper types, calling predicates etc, stays in libcvc5. The PR also slightly refactors the options code to get rid of the assign_* functions.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/node/node_black.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/unit/node/node_black.cpp b/test/unit/node/node_black.cpp index 787dd77ca..45801798b 100644 --- a/test/unit/node/node_black.cpp +++ b/test/unit/node/node_black.cpp @@ -27,6 +27,8 @@ #include "expr/node_manager.h" #include "expr/node_value.h" #include "expr/skolem_manager.h" +#include "options/base_options.h" +#include "options/language.h" #include "options/options_public.h" #include "smt/smt_engine.h" #include "test_node.h" @@ -65,13 +67,8 @@ class TestNodeBlackNode : public TestNode TestNode::SetUp(); // setup an SMT engine so that options are in scope Options opts; - char* argv[2]; - argv[0] = strdup(""); - argv[1] = strdup("--output-lang=ast"); - std::string progName; - options::parse(opts, 2, argv, progName); - free(argv[0]); - free(argv[1]); + opts.base.outputLanguage = OutputLanguage::LANG_AST; + opts.base.outputLanguageWasSetByUser = true; d_smt.reset(new SmtEngine(d_nodeManager.get(), &opts)); } |