Mercurial > irccd
comparison tests/js-logger/main.cpp @ 565:194162717ec9
Irccd: bring new duktape.hpp
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 27 Nov 2017 10:16:45 +0100 |
parents | b3a0f61a35fe |
children | bf56628e070b |
comparison
equal
deleted
inserted
replaced
564:b8ebbc74da0c | 565:194162717ec9 |
---|---|
70 BOOST_FIXTURE_TEST_SUITE(logger_jsapi_suite, logger_test) | 70 BOOST_FIXTURE_TEST_SUITE(logger_jsapi_suite, logger_test) |
71 | 71 |
72 BOOST_AUTO_TEST_CASE(info) | 72 BOOST_AUTO_TEST_CASE(info) |
73 { | 73 { |
74 if (duk_peval_string(plugin_->context(), "Irccd.Logger.info(\"hello!\");") != 0) | 74 if (duk_peval_string(plugin_->context(), "Irccd.Logger.info(\"hello!\");") != 0) |
75 throw dukx_exception(plugin_->context(), -1); | 75 throw dukx_get_exception(plugin_->context(), -1); |
76 | 76 |
77 BOOST_TEST("plugin test: hello!" == line_info); | 77 BOOST_TEST("plugin test: hello!" == line_info); |
78 } | 78 } |
79 | 79 |
80 BOOST_AUTO_TEST_CASE(warning) | 80 BOOST_AUTO_TEST_CASE(warning) |
81 { | 81 { |
82 if (duk_peval_string(plugin_->context(), "Irccd.Logger.warning(\"FAIL!\");") != 0) | 82 if (duk_peval_string(plugin_->context(), "Irccd.Logger.warning(\"FAIL!\");") != 0) |
83 throw dukx_exception(plugin_->context(), -1); | 83 throw dukx_get_exception(plugin_->context(), -1); |
84 | 84 |
85 BOOST_TEST("plugin test: FAIL!" == line_warning); | 85 BOOST_TEST("plugin test: FAIL!" == line_warning); |
86 } | 86 } |
87 | 87 |
88 #if !defined(NDEBUG) | 88 #if !defined(NDEBUG) |
89 | 89 |
90 BOOST_AUTO_TEST_CASE(debug) | 90 BOOST_AUTO_TEST_CASE(debug) |
91 { | 91 { |
92 if (duk_peval_string(plugin_->context(), "Irccd.Logger.debug(\"starting\");") != 0) | 92 if (duk_peval_string(plugin_->context(), "Irccd.Logger.debug(\"starting\");") != 0) |
93 throw dukx_exception(plugin_->context(), -1); | 93 throw dukx_get_exception(plugin_->context(), -1); |
94 | 94 |
95 BOOST_TEST("plugin test: starting" == line_debug); | 95 BOOST_TEST("plugin test: starting" == line_debug); |
96 } | 96 } |
97 | 97 |
98 #endif | 98 #endif |