From 3dd617d33a1b1f8c73709c64130e5ec992ac0525 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 29 May 2019 19:31:52 -0400 Subject: [PATCH] blah lua versions --- single/include/sol/forward.hpp | 4 ++-- single/include/sol/sol.hpp | 4 ++-- tests/runtime_tests/source/operators.cpp | 11 ++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/single/include/sol/forward.hpp b/single/include/sol/forward.hpp index a25732fb..38266fa5 100644 --- a/single/include/sol/forward.hpp +++ b/single/include/sol/forward.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2019-05-29 20:53:05.788092 UTC -// This header was generated with sol v3.0.2 (revision 46a2b01) +// Generated 2019-05-29 23:31:18.215247 UTC +// This header was generated with sol v3.0.2 (revision 5a4d7dc) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/single/include/sol/sol.hpp b/single/include/sol/sol.hpp index 29aa7d8c..a4ea43ce 100644 --- a/single/include/sol/sol.hpp +++ b/single/include/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2019-05-29 20:53:04.799735 UTC -// This header was generated with sol v3.0.2 (revision 46a2b01) +// Generated 2019-05-29 23:31:17.933001 UTC +// This header was generated with sol v3.0.2 (revision 5a4d7dc) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP diff --git a/tests/runtime_tests/source/operators.cpp b/tests/runtime_tests/source/operators.cpp index f7d0bb38..e70e069c 100644 --- a/tests/runtime_tests/source/operators.cpp +++ b/tests/runtime_tests/source/operators.cpp @@ -193,6 +193,7 @@ TEST_CASE("operators/default with pointers", "test that default operations still lua.new_usertype("T"); + T test; lua["t1"] = &test; @@ -201,15 +202,19 @@ TEST_CASE("operators/default with pointers", "test that default operations still lua["t4"] = std::unique_ptr(&test); lua.script("ptr_test = t1 == t2"); - lua.script("ptr_unique_test = t1 == t3"); lua.script("unique_test = t3 == t4"); bool ptr_test = lua["ptr_test"]; - bool ptr_unique_test = lua["ptr_unique_test"]; bool unique_test = lua["unique_test"]; REQUIRE(ptr_test); - REQUIRE(ptr_unique_test); REQUIRE(unique_test); + +#if SOL_LUA_VERSION > 502 + lua.script("ptr_unique_test = t1 == t3"); + + bool ptr_unique_test = lua["ptr_unique_test"]; + REQUIRE(ptr_unique_test); +#endif } TEST_CASE("operators/call", "test call operator generation") {