1 // Copyright Daniel Wallin 2009. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include <luabind/luabind.hpp>
7 #include <luabind/class_info.hpp>
18 void test_main(lua_State
* L
)
20 using namespace luabind
;
28 .def_readonly("x", &X::x
)
29 .def_readonly("y", &X::y
)
34 "info = class_info(x)\n"
35 "assert(info.name == 'X')\n"
36 "assert(info.methods['f'] == x.f)\n"
37 "assert(info.methods['__init'] == x.__init)\n"
38 "assert(info.attributes[1] == 'y')\n"
39 "assert(info.attributes[2] == 'x')\n"