[luabind-cvs] luabind/luabind/test test_object.cpp,1.28.2.2,1.28.2.3
Brought to you by:
arvidn,
daniel_wallin
From: Arvid N. <ar...@us...> - 2006-01-01 16:56:07
|
Update of /cvsroot/luabind/luabind/luabind/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3191/test Modified Files: Tag: luabind_rc_0_7 test_object.cpp Log Message: added stream operator for ValueWrappers Index: test_object.cpp =================================================================== RCS file: /cvsroot/luabind/luabind/luabind/test/test_object.cpp,v retrieving revision 1.28.2.2 retrieving revision 1.28.2.3 diff -u -d -r1.28.2.2 -r1.28.2.3 --- test_object.cpp 30 Dec 2005 16:57:37 -0000 1.28.2.2 +++ test_object.cpp 1 Jan 2006 16:55:56 -0000 1.28.2.3 @@ -28,6 +28,8 @@ #include <luabind/error.hpp> #include <luabind/operator.hpp> +#include <boost/lexical_cast.hpp> + #include <utility> using namespace luabind; @@ -194,6 +196,11 @@ object temp_val = g["temp_val"]; TEST_CHECK(ret_val == temp_val); + g["temp"] = "test string"; + TEST_CHECK(boost::lexical_cast<std::string>(g["temp"]) == "test string"); + g["temp"] = 6; + TEST_CHECK(boost::lexical_cast<std::string>(g["temp"]) == "6"); + TEST_CHECK(object_cast<std::string>(g["glob"]) == "teststring"); TEST_CHECK(object_cast<std::string>(gettable(g, "glob")) == "teststring"); TEST_CHECK(object_cast<std::string>(rawget(g, "glob")) == "teststring"); |