From 4002c32c50cb4dfdb41c6bc9398c34ac226557b0 Mon Sep 17 00:00:00 2001 From: Evan Wies Date: Fri, 27 Nov 2009 15:07:40 +0100 Subject: [PATCH] Test that class_info() don't crash when passed non-luabind objects. --- test/test_class_info.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_class_info.cpp b/test/test_class_info.cpp index 81c133e..3f7ba8b 100644 --- a/test/test_class_info.cpp +++ b/test/test_class_info.cpp @@ -37,6 +37,10 @@ void test_main(lua_State* L) "assert(info.methods['__init'] == x.__init)\n" "assert(info.attributes[1] == 'y')\n" "assert(info.attributes[2] == 'x')\n" + "info = class_info(2)\n" + "assert(info.name == 'number')\n" + "assert(#info.methods == 0)\n" + "assert(#info.attributes == 0)\n" "names = class_names()\n" "assert(type(names) == 'table')\n" "assert(#names == 2)\n" -- 2.11.4.GIT