Fix problem with functor<>() not casting to the proper type and add unit test for this case
This commit is contained in:
16
unittests/functor_creation_test.cpp
Normal file
16
unittests/functor_creation_test.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <chaiscript/utility/utility.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
chaiscript::ChaiScript chai;
|
||||
|
||||
chai.eval("def func() { print(\"Hello World\"); } ");
|
||||
|
||||
boost::function<void ()> f = chai.functor<void ()>("func");
|
||||
|
||||
f();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
}
|
Reference in New Issue
Block a user