Add failing test for functor scope
This commit is contained in:
parent
28f5a74e98
commit
179eaefafe
@ -776,4 +776,12 @@ TEST_CASE("Variable Scope When Calling From C++")
|
||||
CHECK_THROWS(func());
|
||||
}
|
||||
|
||||
TEST_CASE("Variable Scope When Calling From C++ 2")
|
||||
{
|
||||
chaiscript::ChaiScript chai;
|
||||
chai.eval("var obj = 2;");
|
||||
auto func = chai.eval<std::function<void()>>("fun(){ return obj; }");
|
||||
CHECK_THROWS(func());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user