Mercurial > irccd
comparison tests/js-elapsedtimer/main.cpp @ 488:7e273b7f4f92
Irccd: new coding style, closes #576
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 26 Sep 2017 17:18:47 +0200 |
parents | c6fbb6e0e06d |
children | 349fe29d86d5 |
comparison
equal
deleted
inserted
replaced
487:beb6c638b841 | 488:7e273b7f4f92 |
---|---|
1 /* | 1 /* |
2 * main.cpp -- test Irccd.ElapsedTimer API | 2 * main.cpp -- test irccd.ElapsedTimer API |
3 * | 3 * |
4 * Copyright (c) 2013-2017 David Demelier <markand@malikania.fr> | 4 * Copyright (c) 2013-2017 David Demelier <markand@malikania.fr> |
5 * | 5 * |
6 * Permission to use, copy, modify, and/or distribute this software for any | 6 * Permission to use, copy, modify, and/or distribute this software for any |
7 * purpose with or without fee is hereby granted, provided that the above | 7 * purpose with or without fee is hereby granted, provided that the above |
19 #include <gtest/gtest.h> | 19 #include <gtest/gtest.h> |
20 | 20 |
21 #include <thread> | 21 #include <thread> |
22 | 22 |
23 #include <irccd/irccd.hpp> | 23 #include <irccd/irccd.hpp> |
24 #include <irccd/mod-irccd.hpp> | 24 #include <irccd/js_irccd_module.hpp> |
25 #include <irccd/mod-elapsed-timer.hpp> | 25 #include <irccd/js_elapsed_timer_module.hpp> |
26 #include <irccd/plugin-js.hpp> | 26 #include <irccd/js_plugin.hpp> |
27 #include <irccd/service.hpp> | 27 #include <irccd/service.hpp> |
28 | 28 |
29 using namespace irccd; | 29 using namespace irccd; |
30 using namespace std::chrono_literals; | 30 using namespace std::chrono_literals; |
31 | 31 |
32 class TestElapsedTimer : public testing::Test { | 32 class TestElapsedTimer : public testing::Test { |
33 protected: | 33 protected: |
34 Irccd m_irccd; | 34 irccd::irccd m_irccd; |
35 std::shared_ptr<JsPlugin> m_plugin; | 35 std::shared_ptr<js_plugin> m_plugin; |
36 | 36 |
37 TestElapsedTimer() | 37 TestElapsedTimer() |
38 : m_plugin(std::make_shared<JsPlugin>("empty", SOURCEDIR "/empty.js")) | 38 : m_plugin(std::make_shared<js_plugin>("empty", SOURCEDIR "/empty.js")) |
39 { | 39 { |
40 IrccdModule().load(m_irccd, m_plugin); | 40 js_irccd_module().load(m_irccd, m_plugin); |
41 ElapsedTimerModule().load(m_irccd, m_plugin); | 41 js_elapsed_timer_module().load(m_irccd, m_plugin); |
42 } | 42 } |
43 }; | 43 }; |
44 | 44 |
45 TEST_F(TestElapsedTimer, standard) | 45 TEST_F(TestElapsedTimer, standard) |
46 { | 46 { |