diff tests/libclient/js-rectangle/main.cpp @ 27:0a1adf7dcca0

Common: update libjs and adapt code
author David Demelier <markand@malikania.fr>
date Tue, 12 Apr 2016 13:53:11 +0200
parents a8aabea64f17
children a1e80d991968
line wrap: on
line diff
--- a/tests/libclient/js-rectangle/main.cpp	Fri Apr 08 14:16:47 2016 +0200
+++ b/tests/libclient/js-rectangle/main.cpp	Tue Apr 12 13:53:11 2016 +0200
@@ -52,7 +52,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ(0, duk::getGlobal<int>(m_ctx, "x"));
@@ -76,7 +76,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ(10, duk::getGlobal<int>(m_ctx, "x"));
@@ -100,7 +100,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ(10, duk::getGlobal<int>(m_ctx, "x"));
@@ -124,7 +124,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ(10, duk::getGlobal<int>(m_ctx, "x"));
@@ -154,7 +154,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ("TypeError", duk::getGlobal<std::string>(m_ctx, "name"));
@@ -177,7 +177,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ("RangeError", duk::getGlobal<std::string>(m_ctx, "name"));
@@ -209,7 +209,7 @@
 		auto ret = duk::pevalString(m_ctx, "build({ x: 50, y: 80, width: 100, height: 200 });");
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ(50, duk::getGlobal<int>(m_ctx, "x"));
@@ -240,7 +240,7 @@
 		);
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ("Error", duk::getGlobal<std::string>(m_ctx, "name"));
@@ -272,7 +272,7 @@
 		auto ret = duk::pevalString(m_ctx, "build({});");
 
 		if (ret != 0) {
-			throw duk::error(m_ctx, -1);
+			throw duk::exception(m_ctx, -1);
 		}
 
 		ASSERT_EQ(0, duk::getGlobal<int>(m_ctx, "x"));