Merge branch '0.8' to sync with changes made after 0.8.1 release.
[luabind.git] / test / test_table.cpp
blobf03aae714f857f06acce937f56e91d5949237693
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)
5 #include "test.hpp"
6 #include <luabind/luabind.hpp>
8 void f(luabind::table<> const& x)
10 TEST_CHECK(luabind::type(x) == LUA_TTABLE);
13 void g(luabind::table<luabind::argument> const& x)
15 TEST_CHECK(luabind::type(x) == LUA_TTABLE);
18 void test_main(lua_State* L)
20 using namespace luabind;
22 module(L) [
23 def("f", &f),
24 def("g", &g)
27 DOSTRING(L,
28 "f {1,2,3}\n"
29 "g {1,2,3}\n"
32 DOSTRING_EXPECTED(L,
33 "f(1)\n",
34 "No matching overload found, candidates:\n"
35 "void f(table const&)"
38 DOSTRING_EXPECTED(L,
39 "g(1)\n",
40 "No matching overload found, candidates:\n"
41 "void g(table const&)"