diff tests/src/plugins/joke/main.cpp @ 809:8460b4a34191

misc: reorganize namespaces, closes #952 @4h
author David Demelier <markand@malikania.fr>
date Fri, 16 Nov 2018 12:25:00 +0100
parents f362994133ca
children 06cc2f95f479
line wrap: on
line diff
--- a/tests/src/plugins/joke/main.cpp	Thu Nov 15 13:19:17 2018 +0100
+++ b/tests/src/plugins/joke/main.cpp	Fri Nov 16 12:25:00 2018 +0100
@@ -21,7 +21,11 @@
 
 #include <irccd/test/js_plugin_fixture.hpp>
 
-namespace irccd::test {
+using irccd::daemon::plugin;
+
+using irccd::test::js_plugin_fixture;
+
+namespace irccd {
 
 namespace {
 
@@ -42,7 +46,7 @@
 			config.emplace("file", CMAKE_CURRENT_SOURCE_DIR "/jokes.json");
 
 		plugin_->set_options(config);
-		plugin_->handle_load(irccd_);
+		plugin_->handle_load(bot_);
 	}
 };
 
@@ -68,7 +72,7 @@
 	load();
 
 	const auto call = [&] () {
-		plugin_->handle_command(irccd_, { server_, "jean!jean@localhost", "#joke", "" });
+		plugin_->handle_command(bot_, { server_, "jean!jean@localhost", "#joke", "" });
 
 		const auto cmd = server_->find("message").back();
 		const auto msg = std::any_cast<std::string>(cmd[1]);
@@ -107,7 +111,7 @@
 	};
 
 	const auto call = [&] () {
-		plugin_->handle_command(irccd_, { server_, "jean!jean@localhost", "#joke", "" });
+		plugin_->handle_command(bot_, { server_, "jean!jean@localhost", "#joke", "" });
 
 		const auto cmd = server_->find("message").back();
 
@@ -136,7 +140,7 @@
 	};
 
 	const auto call = [&] () {
-		plugin_->handle_command(irccd_, { server_, "jean!jean@localhost", "#joke", "" });
+		plugin_->handle_command(bot_, { server_, "jean!jean@localhost", "#joke", "" });
 
 		const auto cmd = server_->find("message").back();
 
@@ -161,7 +165,7 @@
 {
 	load({{"file", "doesnotexist.json"}});
 
-	plugin_->handle_command(irccd_, { server_, "jean!jean@localhost", "#joke", "" });
+	plugin_->handle_command(bot_, { server_, "jean!jean@localhost", "#joke", "" });
 
 	const auto cmd = server_->find("message").back();
 
@@ -173,7 +177,7 @@
 {
 	load({{"file", CMAKE_CURRENT_SOURCE_DIR "/error-not-array.json"}});
 
-	plugin_->handle_command(irccd_, { server_, "jean!jean@localhost", "#joke", "" });
+	plugin_->handle_command(bot_, { server_, "jean!jean@localhost", "#joke", "" });
 
 	const auto cmd = server_->find("message").back();
 
@@ -185,7 +189,7 @@
 {
 	load({{"file", CMAKE_CURRENT_SOURCE_DIR "/error-empty.json"}});
 
-	plugin_->handle_command(irccd_, {server_, "jean!jean@localhost", "#joke", ""});
+	plugin_->handle_command(bot_, {server_, "jean!jean@localhost", "#joke", ""});
 
 	const auto cmd = server_->find("message").back();
 
@@ -199,4 +203,4 @@
 
 } // !namespace
 
-} // !irccd::test
+} // !irccd