Mercurial > malikania
diff tests/libclient/js-color/main.cpp @ 63:96ba0c5cf893
Misc: update duktape.hpp to new style
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 16 Dec 2016 16:11:24 +0100 |
parents | fe7e3524e571 |
children | 858621081b95 |
line wrap: on
line diff
--- a/tests/libclient/js-color/main.cpp Fri Dec 16 15:38:45 2016 +0100 +++ b/tests/libclient/js-color/main.cpp Fri Dec 16 16:11:24 2016 +0100 @@ -23,7 +23,7 @@ class test_color { protected: - UniqueContext m_ctx; + dukx_context m_ctx; public: test_color() @@ -64,7 +64,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(0, component("r")); @@ -88,7 +88,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(255, component("r")); @@ -112,7 +112,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(0, component("r")); @@ -136,7 +136,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(10, component("r")); @@ -160,7 +160,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(10, component("r")); @@ -184,7 +184,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(10, component("r")); @@ -208,7 +208,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(10, component("r")); @@ -235,7 +235,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } BOOST_REQUIRE_EQUAL(10, component("r")); @@ -269,7 +269,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -296,7 +296,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -323,7 +323,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -350,7 +350,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -377,7 +377,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -404,7 +404,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -431,7 +431,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -458,7 +458,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -485,7 +485,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -533,7 +533,7 @@ auto ret = duk_peval_string(m_ctx, "draw('#ff0000');"); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "r"); @@ -573,7 +573,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -607,7 +607,7 @@ ); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "name"); @@ -654,7 +654,7 @@ auto ret = duk_peval_string(m_ctx, "draw('#ff0000');"); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "r"); @@ -696,7 +696,7 @@ auto ret = duk_peval_string(m_ctx, "draw('#ghijkl');"); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "r"); @@ -738,7 +738,7 @@ auto ret = duk_peval_string(m_ctx, "draw({ red: -1, green: 256, blue: 100, alpha: 800 });"); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "r"); @@ -780,7 +780,7 @@ auto ret = duk_peval_string(m_ctx, "draw(null);"); if (ret != 0) { - throw dukx_exception(m_ctx, -1); + throw dukx_get_exception(m_ctx, -1); } duk_get_global_string(m_ctx, "r");