mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Fix defaults for dynload options
This commit is contained in:
parent
76c7712507
commit
36e61dec0a
@ -832,7 +832,7 @@ namespace chaiscript
|
|||||||
public:
|
public:
|
||||||
ChaiScript(std::vector<std::string> t_modulepaths = {},
|
ChaiScript(std::vector<std::string> t_modulepaths = {},
|
||||||
std::vector<std::string> t_usepaths = {},
|
std::vector<std::string> t_usepaths = {},
|
||||||
const std::vector<Options> &t_opts = {})
|
const std::vector<Options> &t_opts = chaiscript::default_options())
|
||||||
: ChaiScript_Basic(
|
: ChaiScript_Basic(
|
||||||
chaiscript::Std_Lib::library(),
|
chaiscript::Std_Lib::library(),
|
||||||
std::make_unique<parser::ChaiScript_Parser<eval::Noop_Tracer, optimizer::Optimizer_Default>>(),
|
std::make_unique<parser::ChaiScript_Parser<eval::Noop_Tracer, optimizer::Optimizer_Default>>(),
|
||||||
|
|||||||
@ -1316,4 +1316,10 @@ TEST_CASE("Test throwing and catching custom exception")
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_CASE("Test ability to get 'use' function from default construction")
|
||||||
|
{
|
||||||
|
chaiscript::ChaiScript chai;
|
||||||
|
const auto use_function = chai.eval<std::function<chaiscript::Boxed_Value (const std::string &)>>("use");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user