From dcaee3304049902c9bf7ac381a2be3b5d14c7e53 Mon Sep 17 00:00:00 2001 From: Daniel Wallin Date: Wed, 3 Dec 2003 22:12:59 +0000 Subject: [PATCH] *** empty log message *** --- test/test_construction.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/test_construction.cpp b/test/test_construction.cpp index b389d3f..f40e1a9 100644 --- a/test/test_construction.cpp +++ b/test/test_construction.cpp @@ -25,8 +25,25 @@ namespace struct C {}; + struct A_ + { + virtual void doSomething() = 0; + }; + + struct B_ : public A_ + { + void doSomething() {} + }; + + struct C_ : public B_ + { + void doMore() {} + }; + + } // anonymous namespace + bool test_construction() { using namespace luabind; @@ -53,6 +70,17 @@ bool test_construction() ]; + luabind::class_(L, "A_"); + + luabind::class_(L, "B_") + .def(luabind::constructor<>()) + .def("doSomething", &B_::doSomething); + + luabind::class_(L, "C_") + .def(luabind::constructor<>()) + .def("doMore", &C_::doMore); + + if (dostring2(L, "a = C()") == 0) return false; lua_pop(L, 1); // pop error message -- 2.11.4.GIT