Update of /cvsroot/luabind/luabind/luabind/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2291/luabind/test
Modified Files:
Tag: luabind_rc_0_7
test_object.cpp
Log Message:
allowes uninitialized handles to be copied, added tests to verify and to make sure by-value and by-reference assignments works on complex types
Index: test_object.cpp
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/test/test_object.cpp,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- test_object.cpp 28 Nov 2005 20:55:34 -0000 1.28
+++ test_object.cpp 30 Dec 2005 00:04:39 -0000 1.28.2.1
@@ -132,6 +132,10 @@
object uninitialized;
TEST_CHECK(!uninitialized);
TEST_CHECK(!uninitialized.is_valid());
+
+ test_param temp_object;
+ globals(L)["temp"] = temp_object;
+ globals(L)["temp"] = &temp_object;
DOSTRING(L,
"t = 2\n"
@@ -153,6 +157,9 @@
int a = type(test_param_policies);
TEST_CHECK(a == LUA_TFUNCTION);
+ luabind::object obj;
+ obj = luabind::object();
+
// call the function and tell lua to adopt the pointer passed as first argument
test_param_policies(5, new test_param())[adopt(_2)];
|