diff tests/js-timer/main.cpp @ 75:f8160d515a76

Irccd: rework a lot the JavaScript library
author David Demelier <markand@malikania.fr>
date Wed, 30 Mar 2016 13:52:47 +0200
parents 1158cffe5a5e
children 1125d90b3b44
line wrap: on
line diff
--- a/tests/js-timer/main.cpp	Sat Mar 26 14:41:53 2016 +0100
+++ b/tests/js-timer/main.cpp	Wed Mar 30 13:52:47 2016 +0200
@@ -18,9 +18,9 @@
 
 #include <gtest/gtest.h>
 
-#include <irccd.h>
-#include <elapsed-timer.h>
-#include <system.h>
+#include <irccd/elapsed-timer.h>
+#include <irccd/irccd.h>
+#include <irccd/system.h>
 
 using namespace irccd;
 
@@ -38,7 +38,7 @@
 		irccd.dispatch();
 	}
 
-	ASSERT_EQ(1, plugin->context().getGlobal<int>("count"));
+	ASSERT_EQ(1, duk::getGlobal<int>(plugin->context(), "count"));
 }
 
 TEST(Basic, repeat)
@@ -55,7 +55,7 @@
 		irccd.dispatch();
 	}
 
-	ASSERT_GE(plugin->context().getGlobal<int>("count"), 5);
+	ASSERT_GE(duk::getGlobal<int>(plugin->context(), "count"), 5);
 }
 
 #if 0