Initial revision
[luabind.git] / test / test.h
blob182a91c05232f39c8fb68ddd0ed9c6e17deb0dc7
1 #ifndef TEST_H_INCLUDED
2 #define TEST_H_INCLUDED
4 extern "C"
6 #include "lua.h"
7 #include "lualib.h"
10 #define LUABIND_DONT_COPY_STRINGS
12 #include <luabind/luabind.hpp>
13 #include <luabind/dependency_policy.hpp>
14 #include <luabind/out_value_policy.hpp>
15 #include <luabind/adopt_policy.hpp>
16 #include <luabind/copy_policy.hpp>
17 #include <luabind/container_policy.hpp>
18 #include <luabind/discard_result_policy.hpp>
20 bool dostring(lua_State* L, const char* str);
21 int dostring2(lua_State* L, const char* str);
23 struct lua_closer
25 lua_State* L;
26 lua_closer(lua_State* L_): L(L_) {}
27 void release() { if (L) {lua_close(L); L = 0; } }
28 ~lua_closer() { if (L != 0) lua_close(L); }
32 bool test_operators();
33 bool test_attributes();
34 bool test_construction();
35 bool test_implicit_cast();
36 bool test_const();
37 bool test_exceptions();
38 bool test_null_pointer();
39 bool test_policies();
40 bool test_lua_classes();
41 bool test_free_functions();
42 bool test_object();
43 bool test_held_type();
45 #endif