2 #include <luabind/functor.hpp>
6 LUABIND_ANONYMOUS_FIX
int feedback
= 0;
51 void string_string( const std::string
& s1
, const std::string
& s2
)
53 // std::cerr<<s1<<" "<<s2<<std::endl;
59 using namespace luabind
;
61 lua_State
* L
= lua_open();
68 class_
<test_class2
>("test_class2")
70 .def("string_string",&test_class2::string_string
)
75 class_
<test_class
>("test_class")
111 if (dostring(L
, "test.f()")) return false;
112 if (feedback
!= 123) return false;
113 if (dostring(L
, "test.f(3)")) return false;
114 if (feedback
!= 124) return false;
115 if (dostring(L
, "a = test.test_class()")) return false;
116 if (feedback
!= 321) return false;
117 if (dostring(L
, "b = test.test_class.val2")) return false;
118 if (dostring(L
, "test.inner.g()")) return false;
119 if (feedback
!= 2) return false;
120 if (dostring(L
, "test.inner.g(7)")) return false;
121 if (feedback
!= 5) return false;
122 if (dostring(L
, "test.inner.f(4)")) return false;
123 if (feedback
!= 125) return false;
124 if (dostring(L
, "test.inner.h()")) return false;
125 if (feedback
!= 1) return false;