diff tests/js-timer/main.cpp @ 190:cb61cc16e2b6

Irccd: update all JavaScript to native code
author David Demelier <markand@malikania.fr>
date Sun, 05 Jun 2016 10:50:55 +0200
parents 66d3ef1c42b3
children 6635b9187d71
line wrap: on
line diff
--- a/tests/js-timer/main.cpp	Fri Jun 03 13:28:10 2016 +0200
+++ b/tests/js-timer/main.cpp	Sun Jun 05 10:50:55 2016 +0200
@@ -42,7 +42,8 @@
 		irccd.dispatch();
 	}
 
-	ASSERT_EQ(1, duk::getGlobal<int>(plugin->context(), "count"));
+	ASSERT_TRUE(duk_get_global_string(plugin->context(), "count"));
+	ASSERT_EQ(1, duk_get_int(plugin->context(), -1));
 }
 
 TEST(Basic, repeat)
@@ -60,7 +61,8 @@
 		irccd.dispatch();
 	}
 
-	ASSERT_GE(duk::getGlobal<int>(plugin->context(), "count"), 5);
+	ASSERT_TRUE(duk_get_global_string(plugin->context(), "count"));
+	ASSERT_GE(duk_get_int(plugin->context(), -1), 5);
 }
 
 #if 0