From 6c06bddd6e21b0b04146d3abdef5e22c2bd4c9f2 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Fri, 13 Dec 2013 23:33:06 -0500 Subject: [PATCH] Some extra-strength "nothrow" requirements. --- tests.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests.cpp b/tests.cpp index 7dc3debe..4f23f6e4 100644 --- a/tests.cpp +++ b/tests.cpp @@ -114,16 +114,16 @@ TEST_CASE("simple/callLambda", "A C++ lambda is exposed to lua and called") { TEST_CASE("advanced/callLambdaReturns", "Checks for lambdas returning values") { sol::state lua; - lua.set_function("a", [ ] { return 42; }); - lua.set_function("b", [ ] { return 42u; }); - lua.set_function("c", [ ] { return 3.14; }); - lua.set_function("d", [ ] { return 6.28f; }); - lua.set_function("e", [ ] { return "lol"; }); - lua.set_function("f", [ ] { return true; }); - lua.set_function("g", [ ] { return std::string("str"); }); - lua.set_function("h", [ ] { }); - lua.set_function("i", [ ] { return sol::nil; }); - //lua.set_function("i", [ ] { return std::make_tuple(1, 6.28f, 3.14, std::string("heh")); }); + REQUIRE_NOTHROW(lua.set_function("a", [ ] { return 42; })); + REQUIRE_NOTHROW(lua.set_function("b", [ ] { return 42u; })); + REQUIRE_NOTHROW(lua.set_function("c", [ ] { return 3.14; })); + REQUIRE_NOTHROW(lua.set_function("d", [ ] { return 6.28f; })); + REQUIRE_NOTHROW(lua.set_function("e", [ ] { return "lol"; })); + REQUIRE_NOTHROW(lua.set_function("f", [ ] { return true; })); + REQUIRE_NOTHROW(lua.set_function("g", [ ] { return std::string("str"); })); + REQUIRE_NOTHROW(lua.set_function("h", [ ] { })); + REQUIRE_NOTHROW(lua.set_function("i", [ ] { return sol::nil; })); + REQUIRE_NOTHROW(lua.set_function("j", [ ] { return std::make_tuple(1, 6.28f, 3.14, std::string( "heh" )); } )); } TEST_CASE("advanced/callLambda2", "A C++ lambda is exposed to lua and called") {