comparison tests/libclient/js-font/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 f30c84b4b9ed
children
comparison
equal deleted inserted replaced
62:a0081be977b5 63:96ba0c5cf893
31 31
32 class test_font { 32 class test_font {
33 protected: 33 protected:
34 mlk::directory_resources_locator m_locator; 34 mlk::directory_resources_locator m_locator;
35 mlk::client_resources_loader m_loader; 35 mlk::client_resources_loader m_loader;
36 UniqueContext m_ctx; 36 dukx_context m_ctx;
37 37
38 public: 38 public:
39 test_font() 39 test_font()
40 : m_locator(SOURCE_DIRECTORY "/resources") 40 : m_locator(SOURCE_DIRECTORY "/resources")
41 , m_loader(m_locator) 41 , m_loader(m_locator)
64 "w.drawText(s, f, { x: 320 - (c.width / 2), y: 240 - (c.height / 2) });" 64 "w.drawText(s, f, { x: 320 - (c.width / 2), y: 240 - (c.height / 2) });"
65 "w.present();" 65 "w.present();"
66 ); 66 );
67 67
68 if (ret != 0) { 68 if (ret != 0) {
69 throw dukx_exception(m_ctx, -1); 69 throw dukx_get_exception(m_ctx, -1);
70 } 70 }
71 71
72 std::this_thread::sleep_for(3s); 72 std::this_thread::sleep_for(3s);
73 } catch (const std::exception &ex) { 73 } catch (const std::exception &ex) {
74 BOOST_FAIL(ex.what()); 74 BOOST_FAIL(ex.what());