From e6bdcebd87b7056c8a8ed19622454ee1d92718c0 Mon Sep 17 00:00:00 2001 From: "U. Artie Eoff" Date: Wed, 8 May 2013 11:09:23 -0700 Subject: [PATCH] use namespaces Signed-off-by: U. Artie Eoff --- src/test/core/compositor.cpp | 8 ++++ src/test/core/compositor.h | 8 ++++ src/test/core/display.cpp | 8 ++++ src/test/core/display.h | 8 ++++ src/test/core/harness.cpp | 33 +++++++++------- src/test/core/harness.h | 16 ++++++-- src/test/core/pointer.cpp | 7 ++++ src/test/core/pointer.h | 8 ++++ src/test/core/seat.cpp | 10 ++++- src/test/core/seat.h | 8 ++++ src/test/core/shell.cpp | 8 ++++ src/test/core/shell.h | 8 ++++ src/test/core/shell_surface.cpp | 7 ++++ src/test/core/shell_surface.h | 8 ++++ src/test/core/shm.cpp | 8 ++++ src/test/core/shm.h | 8 ++++ src/test/core/surface.cpp | 8 ++++ src/test/core/surface.h | 8 ++++ src/test/core/test_bind_interface.cpp | 15 ++++++-- src/test/core/test_cursor.cpp | 12 ++++-- src/test/core/test_data.cpp | 10 ++++- src/test/core/test_surface.cpp | 11 +++++- src/test/efl/application.cpp | 7 ++++ src/test/efl/application.h | 8 ++++ src/test/efl/background.cpp | 7 ++++ src/test/efl/background.h | 8 ++++ src/test/efl/elmtestharness.cpp | 21 +++++++++-- src/test/efl/elmtestharness.h | 42 +++++++++++++-------- src/test/efl/evasobject.cpp | 7 ++++ src/test/efl/evasobject.h | 8 ++++ src/test/efl/templates.h | 8 ++++ src/test/efl/test_actionslider.cpp | 7 ++++ src/test/efl/test_background.cpp | 7 ++++ src/test/efl/test_bubble.cpp | 7 ++++ src/test/efl/test_button.cpp | 7 ++++ src/test/efl/test_check.cpp | 7 ++++ src/test/efl/test_clock.cpp | 8 ++++ src/test/efl/test_colorselector.cpp | 8 ++++ src/test/efl/test_dayselector.cpp | 7 ++++ src/test/efl/test_engine_set.cpp | 63 ++++++++++++++++++------------- src/test/efl/test_entry.cpp | 7 ++++ src/test/efl/test_fileselector.cpp | 8 ++++ src/test/efl/test_fileselector_button.cpp | 7 ++++ src/test/efl/test_fileselector_entry.cpp | 8 ++++ src/test/efl/test_flip.cpp | 7 ++++ src/test/efl/test_flipselector.cpp | 7 ++++ src/test/efl/test_frame.cpp | 7 ++++ src/test/efl/test_glview.cpp | 7 ++++ src/test/efl/test_hover.cpp | 7 ++++ src/test/efl/test_hoversel.cpp | 7 ++++ src/test/efl/test_icon.cpp | 7 ++++ src/test/efl/test_image.cpp | 7 ++++ src/test/efl/test_inwin.cpp | 7 ++++ src/test/efl/test_label.cpp | 7 ++++ src/test/efl/test_list.cpp | 8 ++++ src/test/efl/test_map.cpp | 7 ++++ src/test/efl/test_mapbuf.cpp | 7 ++++ src/test/efl/test_notify.cpp | 7 ++++ src/test/efl/test_panel.cpp | 7 ++++ src/test/efl/test_popup.cpp | 7 ++++ src/test/efl/test_progressbar.cpp | 7 ++++ src/test/efl/test_window.cpp | 7 ++++ src/test/efl/test_window_fullscreen.cpp | 8 ++++ src/test/efl/test_window_maximize.cpp | 8 ++++ src/test/efl/test_window_move.cpp | 8 ++++ src/test/efl/test_window_resize.cpp | 8 ++++ src/test/efl/window.cpp | 8 ++++ src/test/efl/window.h | 8 ++++ src/test/harness.cpp | 26 ++++++------- src/test/harness.h | 6 +-- 70 files changed, 610 insertions(+), 89 deletions(-) diff --git a/src/test/core/compositor.cpp b/src/test/core/compositor.cpp index ae44686..530d73a 100644 --- a/src/test/core/compositor.cpp +++ b/src/test/core/compositor.cpp @@ -22,6 +22,10 @@ #include "compositor.h" +namespace wfits { +namespace test { +namespace core { + Compositor::Compositor(const Display& display) : display_(display) , wl_compositor_( @@ -47,3 +51,7 @@ TEST(Compositor, "Core/Wrapper") FAIL_IF((wl_compositor*)compositor == NULL); FAIL_UNLESS_EQUAL(wl_compositor_get_user_data(compositor), &compositor); } + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/compositor.h b/src/test/core/compositor.h index 565499a..42ddb6f 100644 --- a/src/test/core/compositor.h +++ b/src/test/core/compositor.h @@ -25,6 +25,10 @@ #include "display.h" +namespace wfits { +namespace test { +namespace core { + class Compositor { public: @@ -40,4 +44,8 @@ private: wl_compositor *wl_compositor_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/display.cpp b/src/test/core/display.cpp index c40d2e5..ff8abc6 100644 --- a/src/test/core/display.cpp +++ b/src/test/core/display.cpp @@ -22,6 +22,10 @@ #include "display.h" +namespace wfits { +namespace test { +namespace core { + Display::Display() : wl_display_(wl_display_connect(0)) , wl_registry_(NULL) @@ -89,3 +93,7 @@ TEST(Display, "Core/Wrapper") ASSERT(not wl_display_get_error(display)); } + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/display.h b/src/test/core/display.h index b7124b4..b36d647 100644 --- a/src/test/core/display.h +++ b/src/test/core/display.h @@ -27,6 +27,10 @@ #include #include "test/tools.h" +namespace wfits { +namespace test { +namespace core { + class Display { typedef std::pair GlobalInfo; @@ -67,4 +71,8 @@ private: Globals globals_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/harness.cpp b/src/test/core/harness.cpp index f33994f..94cb795 100644 --- a/src/test/core/harness.cpp +++ b/src/test/core/harness.cpp @@ -22,46 +22,50 @@ #include "harness.h" -CoreTestHarness::CoreTestHarness() - : TestHarness::TestHarness() +namespace wfits { +namespace test { +namespace core { + +Harness::Harness() + : test::Harness::Harness() , display_() { return; } -CoreTestHarness::~CoreTestHarness() +Harness::~Harness() { return; } -void CoreTestHarness::runStep(CoreTestHarness::TestStep step) const +void Harness::runStep(TestStep step) const { step(); yield(); } -void CoreTestHarness::queueStep(TestStep step) +void Harness::queueStep(TestStep step) { - TestHarness::queueStep( - boost::bind(&CoreTestHarness::runStep, boost::ref(*this), step)); + test::Harness::queueStep( + boost::bind(&Harness::runStep, boost::ref(*this), step)); } -void CoreTestHarness::yield(const unsigned time) const +void Harness::yield(const unsigned time) const { display().yield(time); } -const wfits::test::Client& CoreTestHarness::client() const +const test::Client& Harness::client() const { - static const wfits::test::Client c(display_); + static const test::Client c(display_); return c; } -class SimpleTest : public CoreTestHarness +class SimpleTest : public Harness { public: SimpleTest() : - CoreTestHarness::CoreTestHarness() + Harness::Harness() , tested(0) { return; @@ -88,7 +92,7 @@ public: unsigned tested; }; -class GlobalPointerTest : public CoreTestHarness +class GlobalPointerTest : public Harness { public: void setup() @@ -116,3 +120,6 @@ public: WFITS_CORE_HARNESS_TEST_CASE(SimpleTest, "Harness") WFITS_CORE_HARNESS_TEST_CASE(GlobalPointerTest, "Harness") +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/harness.h b/src/test/core/harness.h index 69e7cd3..6443dd2 100644 --- a/src/test/core/harness.h +++ b/src/test/core/harness.h @@ -26,19 +26,23 @@ #include "test/harness.h" #include "display.h" -class CoreTestHarness : public ::wfits::test::TestHarness +namespace wfits { +namespace test { +namespace core { + +class Harness : public test::Harness { public: - CoreTestHarness(); + Harness(); - virtual ~CoreTestHarness(); + virtual ~Harness(); void queueStep(TestStep); const Display& display() const { return display_; } /*virtual*/ void yield(const unsigned = 0.001 * 1e6) const; - /*virtual*/ const ::wfits::test::Client& client() const; + /*virtual*/ const test::Client& client() const; private: void runStep(TestStep step) const; @@ -49,4 +53,8 @@ private: #define WFITS_CORE_HARNESS_TEST_CASE(HarnessClass, suite) \ HARNESS_TEST(HarnessClass, "Core/" suite) +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/pointer.cpp b/src/test/core/pointer.cpp index cca4760..5affe3c 100644 --- a/src/test/core/pointer.cpp +++ b/src/test/core/pointer.cpp @@ -23,6 +23,10 @@ #include "surface.h" #include "pointer.h" +namespace wfits { +namespace test { +namespace core { + Pointer::Pointer(const Seat& seat) : seat_(seat) , focus_(NULL) @@ -142,3 +146,6 @@ TEST(Pointer, "Core/Wrapper") FAIL_UNLESS(pointer.hasFocus(NULL)); } +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/pointer.h b/src/test/core/pointer.h index f183326..7ba9696 100644 --- a/src/test/core/pointer.h +++ b/src/test/core/pointer.h @@ -25,6 +25,10 @@ #include "seat.h" +namespace wfits { +namespace test { +namespace core { + class Surface; class Pointer @@ -66,4 +70,8 @@ private: wl_pointer* wl_pointer_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/seat.cpp b/src/test/core/seat.cpp index 3c4921f..6088c02 100644 --- a/src/test/core/seat.cpp +++ b/src/test/core/seat.cpp @@ -22,6 +22,10 @@ #include "seat.h" +namespace wfits { +namespace test { +namespace core { + Seat::Seat(const Display& display) : display_(display) , wl_seat_(display.bind("wl_seat", &wl_seat_interface)) @@ -60,4 +64,8 @@ TEST(Seat, "Core/Wrapper") FAIL_IF((wl_seat*)seat == NULL); FAIL_UNLESS_EQUAL(wl_seat_get_user_data(seat), &seat); FAIL_IF_EQUAL(seat.capabilities(), 0u); -} \ No newline at end of file +} + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/seat.h b/src/test/core/seat.h index 23109d9..326ef41 100644 --- a/src/test/core/seat.h +++ b/src/test/core/seat.h @@ -25,6 +25,10 @@ #include "display.h" +namespace wfits { +namespace test { +namespace core { + class Seat { public: @@ -44,4 +48,8 @@ private: uint32_t capabilities_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/shell.cpp b/src/test/core/shell.cpp index 74fcf2b..7b594e0 100644 --- a/src/test/core/shell.cpp +++ b/src/test/core/shell.cpp @@ -22,6 +22,10 @@ #include "shell.h" +namespace wfits { +namespace test { +namespace core { + Shell::Shell(const Display& display) : display_(display) , wl_shell_( @@ -49,3 +53,7 @@ TEST(Shell, "Core/Wrapper") FAIL_IF((wl_shell*)shell == NULL); FAIL_UNLESS_EQUAL(wl_shell_get_user_data(shell), &shell); } + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/shell.h b/src/test/core/shell.h index 32e1efa..e34891a 100644 --- a/src/test/core/shell.h +++ b/src/test/core/shell.h @@ -25,6 +25,10 @@ #include "display.h" +namespace wfits { +namespace test { +namespace core { + class Shell { public: @@ -40,4 +44,8 @@ private: wl_shell *wl_shell_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/shell_surface.cpp b/src/test/core/shell_surface.cpp index 6f28a86..a537f5d 100644 --- a/src/test/core/shell_surface.cpp +++ b/src/test/core/shell_surface.cpp @@ -22,6 +22,10 @@ #include "shell_surface.h" +namespace wfits { +namespace test { +namespace core { + ShellSurface::ShellSurface(const Shell& shell, const Surface& surface) : shell_(shell) , surface_(surface) @@ -85,3 +89,6 @@ TEST(ShellSurface, "Core/Wrapper") FAIL_UNLESS_EQUAL(wl_shell_surface_get_user_data(ss), &ss); } +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/shell_surface.h b/src/test/core/shell_surface.h index 47e3b43..f339f07 100644 --- a/src/test/core/shell_surface.h +++ b/src/test/core/shell_surface.h @@ -26,6 +26,10 @@ #include "shell.h" #include "surface.h" +namespace wfits { +namespace test { +namespace core { + class ShellSurface { public: @@ -50,4 +54,8 @@ private: wl_shell_surface *wl_shell_surface_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/shm.cpp b/src/test/core/shm.cpp index bfe7835..6dce476 100644 --- a/src/test/core/shm.cpp +++ b/src/test/core/shm.cpp @@ -23,6 +23,10 @@ #include #include "shm.h" +namespace wfits { +namespace test { +namespace core { + SharedMemory::SharedMemory(const Display& display) : display_(display) , wl_shm_(display.bind("wl_shm", &wl_shm_interface)) @@ -144,3 +148,7 @@ TEST(SharedMemoryBuffer, "Core/Wrapper") FAIL_UNLESS_EQUAL(buffer.stride(), 4*24); FAIL_UNLESS_EQUAL(buffer.size(), 4*24*13); } + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/shm.h b/src/test/core/shm.h index 4a7ac77..62c870b 100644 --- a/src/test/core/shm.h +++ b/src/test/core/shm.h @@ -25,6 +25,10 @@ #include "display.h" +namespace wfits { +namespace test { +namespace core { + class SharedMemory { public: @@ -67,4 +71,8 @@ private: }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/surface.cpp b/src/test/core/surface.cpp index a2f5023..8e819fd 100644 --- a/src/test/core/surface.cpp +++ b/src/test/core/surface.cpp @@ -22,6 +22,10 @@ #include "surface.h" +namespace wfits { +namespace test { +namespace core { + Surface::Surface(const Compositor& compositor) : compositor_(compositor) , wl_surface_( @@ -92,3 +96,7 @@ TEST(Surface, "Core/Wrapper") FAIL_IF((wl_surface*)surface == NULL); FAIL_UNLESS_EQUAL(wl_surface_get_user_data(surface), &surface); } + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/surface.h b/src/test/core/surface.h index 6665128..56eab6d 100644 --- a/src/test/core/surface.h +++ b/src/test/core/surface.h @@ -25,6 +25,10 @@ #include "compositor.h" +namespace wfits { +namespace test { +namespace core { + class Surface { public: @@ -45,4 +49,8 @@ private: wl_surface *wl_surface_; }; +} // namespace core +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/core/test_bind_interface.cpp b/src/test/core/test_bind_interface.cpp index 145db1d..069b565 100644 --- a/src/test/core/test_bind_interface.cpp +++ b/src/test/core/test_bind_interface.cpp @@ -22,12 +22,16 @@ #include "harness.h" +namespace wfits { +namespace test { +namespace core { + template -class BindInterface : public CoreTestHarness +class BindInterface : public Harness { public: BindInterface() - : CoreTestHarness::CoreTestHarness() + : Harness::Harness() , object_(NULL) { return; @@ -58,6 +62,9 @@ BIND_TEST(wl_output) BIND_TEST(wl_seat) BIND_TEST(wl_shell) BIND_TEST(wl_data_device_manager) -// BIND_TEST(wfits_input) -// BIND_TEST(wfits_query) +BIND_TEST(wfits_input) +BIND_TEST(wfits_query) +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/test_cursor.cpp b/src/test/core/test_cursor.cpp index 05c3f4d..a1e6a0a 100644 --- a/src/test/core/test_cursor.cpp +++ b/src/test/core/test_cursor.cpp @@ -20,7 +20,6 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include "harness.h" @@ -34,11 +33,15 @@ struct wl_cursor_theme { int size; }; -class ThemeLoadTest : public CoreTestHarness +namespace wfits { +namespace test { +namespace core { + +class ThemeLoadTest : public Harness { public: ThemeLoadTest() - : CoreTestHarness::CoreTestHarness() + : Harness::Harness() , shm_(display().bind("wl_shm", &wl_shm_interface)) { ASSERT(shm_ != NULL); @@ -71,3 +74,6 @@ private: WFITS_CORE_HARNESS_TEST_CASE(ThemeLoadTest, "Cursor"); +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/test_data.cpp b/src/test/core/test_data.cpp index 753e1b7..d86d74c 100644 --- a/src/test/core/test_data.cpp +++ b/src/test/core/test_data.cpp @@ -23,8 +23,12 @@ #include #include "harness.h" +namespace wfits { +namespace test { +namespace core { + template -class DataTest : public CoreTestHarness +class DataTest : public Harness { public: virtual void setup() @@ -87,3 +91,7 @@ DATA_TEST(wl_output) DATA_TEST(wl_seat) DATA_TEST(wl_shell) DATA_TEST(wl_data_device_manager) + +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/core/test_surface.cpp b/src/test/core/test_surface.cpp index a83f5ff..88c18c8 100644 --- a/src/test/core/test_surface.cpp +++ b/src/test/core/test_surface.cpp @@ -29,11 +29,15 @@ #include "shell_surface.h" #include "shm.h" -class SurfacePointerTest : public CoreTestHarness +namespace wfits { +namespace test { +namespace core { + +class SurfacePointerTest : public Harness { public: SurfacePointerTest() - : CoreTestHarness::CoreTestHarness() + : Harness::Harness() , compositor_(display()) , shell_(display()) , seat_(display()) @@ -125,3 +129,6 @@ public: WFITS_CORE_HARNESS_TEST_CASE(SurfacePointerTest, "Input"); +} // namespace core +} // namespace test +} // namespace wfits diff --git a/src/test/efl/application.cpp b/src/test/efl/application.cpp index 74a6582..843e142 100644 --- a/src/test/efl/application.cpp +++ b/src/test/efl/application.cpp @@ -24,6 +24,10 @@ #include "application.h" +namespace wfits { +namespace test { +namespace efl { + Application::Application() { elm_init( @@ -67,3 +71,6 @@ void Application::yield(const unsigned time) usleep(time); } +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/application.h b/src/test/efl/application.h index 90f87b6..1fac376 100644 --- a/src/test/efl/application.h +++ b/src/test/efl/application.h @@ -25,6 +25,10 @@ #include "test/tools.h" +namespace wfits { +namespace test { +namespace efl { + class Application { public: @@ -55,4 +59,8 @@ public: static void yield(const unsigned time = 0.01 * 1e6); }; +} // namespace efl +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/efl/background.cpp b/src/test/efl/background.cpp index cd8ffc7..ea4ac94 100644 --- a/src/test/efl/background.cpp +++ b/src/test/efl/background.cpp @@ -22,6 +22,10 @@ #include "background.h" +namespace wfits { +namespace test { +namespace efl { + using boost::filesystem::path; Background::Background(EvasObject& parent) @@ -64,3 +68,6 @@ Elm_Bg_Option Background::getImageOpt() return elm_bg_option_get(*this); } +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/background.h b/src/test/efl/background.h index 51158d5..14c9177 100644 --- a/src/test/efl/background.h +++ b/src/test/efl/background.h @@ -32,6 +32,10 @@ #include #include "evasobject.h" +namespace wfits { +namespace test { +namespace efl { + class Background : public EvasObject { public: @@ -46,4 +50,8 @@ public: Elm_Bg_Option getImageOpt(); }; +} // namespace efl +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/efl/elmtestharness.cpp b/src/test/efl/elmtestharness.cpp index 9d98f66..54d85a4 100644 --- a/src/test/efl/elmtestharness.cpp +++ b/src/test/efl/elmtestharness.cpp @@ -24,8 +24,12 @@ #include "elmtestharness.h" #include "test/client.h" +namespace wfits { +namespace test { +namespace efl { + ElmTestHarness::ElmTestHarness() - : ::wfits::test::TestHarness::TestHarness() + : test::Harness::Harness() , eventType_(ecore_event_type_new()) , handler_(NULL) { @@ -37,9 +41,9 @@ void ElmTestHarness::yield(const unsigned time) const Application::yield(time); } -const ::wfits::test::Client& ElmTestHarness::client() const +const test::Client& ElmTestHarness::client() const { - static const ::wfits::test::Client c(ecore_wl_display_get()); + static const test::Client c(ecore_wl_display_get()); return c; } @@ -124,3 +128,14 @@ Eina_Bool ElmTestHarness::doStep(void* data, int, void*) return ECORE_CALLBACK_DONE; } + +class SimpleTest : public ElmTestHarness +{ +public: +}; + +WAYLAND_ELM_HARNESS_TEST_CASE(SimpleTest, "Harness") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/elmtestharness.h b/src/test/efl/elmtestharness.h index 60b4444..8c3eaf4 100644 --- a/src/test/efl/elmtestharness.h +++ b/src/test/efl/elmtestharness.h @@ -29,13 +29,16 @@ #include "test/harness.h" #include "application.h" -class ElmTestHarness : public ::wfits::test::TestHarness +namespace wfits { +namespace test { +namespace efl { + +class ElmTestHarness : public test::Harness { public: typedef ::boost::function Condition; - typedef ::wfits::test::TestHarness::TestStep TestStep; - using ::wfits::test::TestHarness::queueStep; + using test::Harness::queueStep; /** * Construct the test harness. @@ -47,7 +50,7 @@ public: void queueStep(TestStep, const std::string&); /*virtual*/ void yield(const unsigned time = 0.01 * 1e6) const; - /*virtual*/ const ::wfits::test::Client& client() const; + /*virtual*/ const test::Client& client() const; void stepUntilCondition(Condition condition); void assertCondition(Condition condition); @@ -62,25 +65,32 @@ private: }; #define WAYLAND_ELM_HARNESS_EGL_TEST_CASE(Harness, suite) \ -TEST(Egl##Harness, "EFL/" suite) \ -{ \ - Application app; \ - app.setEngine(Application::ENGINE_EGL); \ - Harness().run(); \ -} +namespace egl { \ + TEST(Harness, "EFL/Egl/" suite) \ + { \ + Application app; \ + app.setEngine(Application::ENGINE_EGL); \ + Harness().run(); \ + } \ +} // namespace egl #define WAYLAND_ELM_HARNESS_SHM_TEST_CASE(Harness, suite) \ -TEST(Shm##Harness, "EFL/" suite) \ -{ \ - Application app; \ - app.setEngine(Application::ENGINE_SHM); \ - Harness().run(); \ -} +namespace shm { \ + TEST(Harness, "EFL/Shm/" suite) \ + { \ + Application app; \ + app.setEngine(Application::ENGINE_SHM); \ + Harness().run(); \ + } \ +} // namespace shm #define WAYLAND_ELM_HARNESS_TEST_CASE(Harness, suite) \ WAYLAND_ELM_HARNESS_SHM_TEST_CASE(Harness, suite) \ WAYLAND_ELM_HARNESS_EGL_TEST_CASE(Harness, suite) +} // namespace efl +} // namespace test +} // namespace wfits #endif diff --git a/src/test/efl/evasobject.cpp b/src/test/efl/evasobject.cpp index c3dc0a1..5d6f921 100644 --- a/src/test/efl/evasobject.cpp +++ b/src/test/efl/evasobject.cpp @@ -23,6 +23,10 @@ #include "evasobject.h" #include "test/tools.h" +namespace wfits { +namespace test { +namespace efl { + EvasObject::EvasObject(Evas_Object* o, bool autodel) : obj_(o) , autodel_(autodel) @@ -158,3 +162,6 @@ void EvasObject::checkVisible(const Eina_Bool isVisible) FAIL_UNLESS_EQUAL(this->isVisible(), isVisible); } +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/evasobject.h b/src/test/efl/evasobject.h index dbf4139..2b4cfcf 100644 --- a/src/test/efl/evasobject.h +++ b/src/test/efl/evasobject.h @@ -26,6 +26,10 @@ #include #include "common/util.h" +namespace wfits { +namespace test { +namespace efl { + class EvasObject { public: @@ -64,4 +68,8 @@ private: bool autodel_; }; +} // namespace efl +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/efl/templates.h b/src/test/efl/templates.h index 307cbbd..96d33e9 100644 --- a/src/test/efl/templates.h +++ b/src/test/efl/templates.h @@ -32,6 +32,10 @@ #include "evasobject.h" #include "window.h" +namespace wfits { +namespace test { +namespace efl { + template class ResizeObjectTest : public ElmTestHarness { @@ -318,5 +322,9 @@ private: }; */ +} // namespace efl +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/efl/test_actionslider.cpp b/src/test/efl/test_actionslider.cpp index cce2e88..2116d08 100644 --- a/src/test/efl/test_actionslider.cpp +++ b/src/test/efl/test_actionslider.cpp @@ -34,6 +34,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; class Actionslider : public EvasObject @@ -243,3 +247,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(ActionsliderVisibilityTest, "ActionSlider") WAYLAND_ELM_HARNESS_TEST_CASE(ActionsliderIndicatorTest, "ActionSlider") WAYLAND_ELM_HARNESS_TEST_CASE(ActionSliderUserTest, "ActionSlider") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_background.cpp b/src/test/efl/test_background.cpp index 6382538..aff4fb3 100644 --- a/src/test/efl/test_background.cpp +++ b/src/test/efl/test_background.cpp @@ -31,6 +31,10 @@ #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + using boost::filesystem::path; using std::vector; @@ -133,3 +137,6 @@ private: WAYLAND_ELM_HARNESS_TEST_CASE(BackgroundColorTest, "Background") WAYLAND_ELM_HARNESS_TEST_CASE(BackgroundImageTest, "Background") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_bubble.cpp b/src/test/efl/test_bubble.cpp index e72df30..030d3eb 100644 --- a/src/test/efl/test_bubble.cpp +++ b/src/test/efl/test_bubble.cpp @@ -28,6 +28,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; using std::string; @@ -215,3 +219,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(BubbleTextTest, "Bubble") WAYLAND_ELM_HARNESS_TEST_CASE(BubbleUserClickTest, "Bubble") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_button.cpp b/src/test/efl/test_button.cpp index 22a8936..fb5041f 100644 --- a/src/test/efl/test_button.cpp +++ b/src/test/efl/test_button.cpp @@ -27,6 +27,10 @@ #include +namespace wfits { +namespace test { +namespace efl { + using std::vector; class Button : public EvasObject @@ -345,3 +349,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(ButtonResizeTest, "Button") WAYLAND_ELM_HARNESS_TEST_CASE(ButtonPositionTest, "Button") WAYLAND_ELM_HARNESS_TEST_CASE(ButtonVisibilityTest, "Button") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_check.cpp b/src/test/efl/test_check.cpp index de3a309..fe64e9f 100644 --- a/src/test/efl/test_check.cpp +++ b/src/test/efl/test_check.cpp @@ -27,6 +27,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Check : public EvasObject { public: @@ -256,3 +260,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(CheckUserStateTest, "Check") // WAYLAND_ELM_HARNESS_TEST_CASE(CheckPartTextOnTest, "Check") // WAYLAND_ELM_HARNESS_TEST_CASE(CheckPartTextOffTest, "Check") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_clock.cpp b/src/test/efl/test_clock.cpp index 3623a5a..1164984 100644 --- a/src/test/efl/test_clock.cpp +++ b/src/test/efl/test_clock.cpp @@ -28,6 +28,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Clock : public EvasObject { public: @@ -196,3 +200,7 @@ WAYLAND_ELM_HARNESS_TEST_CASE(ClockVisibilityTest, "Clock") WAYLAND_ELM_HARNESS_TEST_CASE(ClockTimeTest, "Clock") WAYLAND_ELM_HARNESS_TEST_CASE(ClockEditionTest, "Clock") WAYLAND_ELM_HARNESS_TEST_CASE(ClockDigitEditionTest, "Clock") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_colorselector.cpp b/src/test/efl/test_colorselector.cpp index c5c58e3..fcee8e9 100644 --- a/src/test/efl/test_colorselector.cpp +++ b/src/test/efl/test_colorselector.cpp @@ -27,6 +27,10 @@ #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + class ColorselectorColorTest : public ElmTestHarness { public: @@ -61,3 +65,7 @@ private: }; WAYLAND_ELM_HARNESS_TEST_CASE(ColorselectorColorTest, "ColorSelector") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_dayselector.cpp b/src/test/efl/test_dayselector.cpp index 32ee6e2..0068225 100644 --- a/src/test/efl/test_dayselector.cpp +++ b/src/test/efl/test_dayselector.cpp @@ -30,6 +30,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; class Dayselector : public EvasObject @@ -155,3 +159,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(DayselectorVisibilityTest, "DaySelector") WAYLAND_ELM_HARNESS_TEST_CASE(DayselectorDayTest, "DaySelector") WAYLAND_ELM_HARNESS_TEST_CASE(DayselectorLocaleTest, "DaySelector") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_engine_set.cpp b/src/test/efl/test_engine_set.cpp index 121ffe6..8f5f659 100644 --- a/src/test/efl/test_engine_set.cpp +++ b/src/test/efl/test_engine_set.cpp @@ -23,37 +23,48 @@ #include #include "test/tools.h" -TEST(ShmSetEngineTest, "EFL/Engine") -{ - const std::string engine("wayland_shm"); +namespace wfits { +namespace test { +namespace efl { - elm_init( - TheGlobalTestSuite::instance().argc, - TheGlobalTestSuite::instance().argv - ); +namespace shm { + TEST(SetEngineTest, "EFL/Shm") + { + const std::string engine("wayland_shm"); - elm_config_preferred_engine_set(engine.c_str()); // override's ELM_ENGINE user environment setting - elm_config_engine_set(engine.c_str()); - FAIL_UNLESS_EQUAL(engine, std::string(elm_config_preferred_engine_get())); - FAIL_UNLESS_EQUAL(engine, std::string(elm_config_engine_get())); + elm_init( + TheGlobalTestSuite::instance().argc, + TheGlobalTestSuite::instance().argv + ); - elm_shutdown(); -} + elm_config_preferred_engine_set(engine.c_str()); // override's ELM_ENGINE user environment setting + elm_config_engine_set(engine.c_str()); + FAIL_UNLESS_EQUAL(engine, std::string(elm_config_preferred_engine_get())); + FAIL_UNLESS_EQUAL(engine, std::string(elm_config_engine_get())); -TEST(EglSetEngineTest, "EFL/Engine") -{ - const std::string engine("wayland_egl"); + elm_shutdown(); + } +} // namespace shm - elm_init( - TheGlobalTestSuite::instance().argc, - TheGlobalTestSuite::instance().argv - ); +namespace egl { + TEST(SetEngineTest, "EFL/Egl") + { + const std::string engine("wayland_egl"); - elm_config_preferred_engine_set(engine.c_str()); // override's ELM_ENGINE user environment setting - elm_config_engine_set(engine.c_str()); - FAIL_UNLESS_EQUAL(engine, std::string(elm_config_preferred_engine_get())); - FAIL_UNLESS_EQUAL(engine, std::string(elm_config_engine_get())); + elm_init( + TheGlobalTestSuite::instance().argc, + TheGlobalTestSuite::instance().argv + ); - elm_shutdown(); -} + elm_config_preferred_engine_set(engine.c_str()); // override's ELM_ENGINE user environment setting + elm_config_engine_set(engine.c_str()); + FAIL_UNLESS_EQUAL(engine, std::string(elm_config_preferred_engine_get())); + FAIL_UNLESS_EQUAL(engine, std::string(elm_config_engine_get())); + elm_shutdown(); + } +} // namespace egl + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_entry.cpp b/src/test/efl/test_entry.cpp index c10d218..d6ddd27 100644 --- a/src/test/efl/test_entry.cpp +++ b/src/test/efl/test_entry.cpp @@ -27,6 +27,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::string; using std::vector; @@ -304,3 +308,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(EntryCutTest, "Entry") WAYLAND_ELM_HARNESS_TEST_CASE(EntryCopyTest, "Entry") WAYLAND_ELM_HARNESS_TEST_CASE(EntryPasteTest, "Entry") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_fileselector.cpp b/src/test/efl/test_fileselector.cpp index 3a8ee57..361285a 100644 --- a/src/test/efl/test_fileselector.cpp +++ b/src/test/efl/test_fileselector.cpp @@ -30,6 +30,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; class Fileselector : public EvasObject @@ -248,3 +252,7 @@ WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorFolderOnlyTest, "FileSelector") WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorIsSaveTest, "FileSelector") WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorModeTest, "FileSelector") WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorOkCancelTest, "FileSelector") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_fileselector_button.cpp b/src/test/efl/test_fileselector_button.cpp index 4121f70..8efd687 100644 --- a/src/test/efl/test_fileselector_button.cpp +++ b/src/test/efl/test_fileselector_button.cpp @@ -30,6 +30,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; class FileselectorButton : public EvasObject @@ -208,3 +212,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorButtonFolderOnlyTest, "FileSelectorBut WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorButtonIsSaveTest, "FileSelectorButton") WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorButtonInwinTest, "FileSelectorButton") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_fileselector_entry.cpp b/src/test/efl/test_fileselector_entry.cpp index 932fee7..08dd715 100644 --- a/src/test/efl/test_fileselector_entry.cpp +++ b/src/test/efl/test_fileselector_entry.cpp @@ -30,6 +30,11 @@ #include "elmtestharness.h" #include "templates.h" + +namespace wfits { +namespace test { +namespace efl { + using std::vector; // TODO: FileselectorEntry and FileselectorButton share a lot of commonality @@ -210,3 +215,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorEntryFolderOnlyTest, "FileSelectorEntr WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorEntryIsSaveTest, "FileSelectorEntry") WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorEntryInwinTest, "FileSelectorEntry") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_flip.cpp b/src/test/efl/test_flip.cpp index 4777ec3..892f740 100644 --- a/src/test/efl/test_flip.cpp +++ b/src/test/efl/test_flip.cpp @@ -27,6 +27,10 @@ #include "background.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using boost::filesystem::path; using std::vector; @@ -157,3 +161,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(FlipResizeTest, "Flip") WAYLAND_ELM_HARNESS_TEST_CASE(FlipPositionTest, "Flip") WAYLAND_ELM_HARNESS_TEST_CASE(FlipVisibilityTest, "Flip") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_flipselector.cpp b/src/test/efl/test_flipselector.cpp index 6f9d48e..dbf3086 100644 --- a/src/test/efl/test_flipselector.cpp +++ b/src/test/efl/test_flipselector.cpp @@ -27,6 +27,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; using std::string; @@ -121,3 +125,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(FlipSelectorResizeTest, "FlipSelector") WAYLAND_ELM_HARNESS_TEST_CASE(FlipSelectorPositionTest, "FlipSelector") WAYLAND_ELM_HARNESS_TEST_CASE(FlipSelectorVisibilityTest, "FlipSelector") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_frame.cpp b/src/test/efl/test_frame.cpp index 2569a76..d430ef0 100644 --- a/src/test/efl/test_frame.cpp +++ b/src/test/efl/test_frame.cpp @@ -22,6 +22,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Frame : public EvasObject { public: @@ -82,3 +86,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(FrameResizeTest, "Frame") WAYLAND_ELM_HARNESS_TEST_CASE(FramePositionTest, "Frame") WAYLAND_ELM_HARNESS_TEST_CASE(FrameVisibilityTest, "Frame") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_glview.cpp b/src/test/efl/test_glview.cpp index b5a3c0a..1aa18ee 100644 --- a/src/test/efl/test_glview.cpp +++ b/src/test/efl/test_glview.cpp @@ -24,6 +24,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class GLView : public EvasObject { public: @@ -232,3 +236,6 @@ WAYLAND_ELM_HARNESS_EGL_TEST_CASE(GLViewRenderPolicyTest, "GLView") WAYLAND_ELM_HARNESS_EGL_TEST_CASE(GLViewModeTest, "GLView") WAYLAND_ELM_HARNESS_EGL_TEST_CASE(GLViewAPITest, "GLView") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_hover.cpp b/src/test/efl/test_hover.cpp index 1cf7620..580cfc6 100644 --- a/src/test/efl/test_hover.cpp +++ b/src/test/efl/test_hover.cpp @@ -26,6 +26,10 @@ #include "background.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; using std::string; @@ -89,3 +93,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(HoverPositionTest, "Hover") WAYLAND_ELM_HARNESS_TEST_CASE(HoverVisibilityTest, "Hover") WAYLAND_ELM_HARNESS_TEST_CASE(HoverParentTargetTest, "Hover") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_hoversel.cpp b/src/test/efl/test_hoversel.cpp index 49f9ce7..64e6f14 100644 --- a/src/test/efl/test_hoversel.cpp +++ b/src/test/efl/test_hoversel.cpp @@ -22,6 +22,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Hoversel : public EvasObject { public: @@ -41,3 +45,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(HoverselResizeTest, "Hoversel") WAYLAND_ELM_HARNESS_TEST_CASE(HoverselPositionTest, "Hoversel") WAYLAND_ELM_HARNESS_TEST_CASE(HoverselVisibilityTest, "Hoversel") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_icon.cpp b/src/test/efl/test_icon.cpp index 811035e..36dbf75 100644 --- a/src/test/efl/test_icon.cpp +++ b/src/test/efl/test_icon.cpp @@ -25,6 +25,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; using std::string; @@ -128,3 +132,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(IconPositionTest, "Icon") WAYLAND_ELM_HARNESS_TEST_CASE(IconVisibilityTest, "Icon") WAYLAND_ELM_HARNESS_TEST_CASE(IconStandardTest, "Icon") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_image.cpp b/src/test/efl/test_image.cpp index b3d510e..3487d5b 100644 --- a/src/test/efl/test_image.cpp +++ b/src/test/efl/test_image.cpp @@ -27,6 +27,10 @@ #include "templates.h" #include "background.h" +namespace wfits { +namespace test { +namespace efl { + static const boost::filesystem::path img(MEDIA_PATH"/bridge_of_the_gods.png"); static const boost::filesystem::path gif(MEDIA_PATH"/ADN_animation.gif"); @@ -206,3 +210,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(ImageAnimateTest, "Image") WAYLAND_ELM_HARNESS_TEST_CASE(ImageFileTest, "Image") WAYLAND_ELM_HARNESS_TEST_CASE(ImageOrientTest, "Image") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_inwin.cpp b/src/test/efl/test_inwin.cpp index 5e537b4..cca0436 100644 --- a/src/test/efl/test_inwin.cpp +++ b/src/test/efl/test_inwin.cpp @@ -22,6 +22,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Inwin : public EvasObject { public: @@ -42,3 +46,6 @@ typedef VisibleObjectTest InwinVisibilityTest; WAYLAND_ELM_HARNESS_TEST_CASE(InwinPositionTest, "Inwin") WAYLAND_ELM_HARNESS_TEST_CASE(InwinVisibilityTest, "Inwin") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_label.cpp b/src/test/efl/test_label.cpp index 22ab7ac..baaf6e2 100644 --- a/src/test/efl/test_label.cpp +++ b/src/test/efl/test_label.cpp @@ -24,6 +24,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + // From "A Tale of Two Cities" by Dickens, Ch 5 (Public Domain, WikiSource) static const char* dickens = "A large cask of wine had been dropped and broken, in the street. The accident " @@ -156,3 +160,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(LabelVisibilityTest, "Label") WAYLAND_ELM_HARNESS_TEST_CASE(LabelWrapTest, "Label") WAYLAND_ELM_HARNESS_TEST_CASE(LabelWrapWidthTest, "Label") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_list.cpp b/src/test/efl/test_list.cpp index 69b0d16..b526e6f 100644 --- a/src/test/efl/test_list.cpp +++ b/src/test/efl/test_list.cpp @@ -29,6 +29,10 @@ #include "elmtestharness.h" #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class List : public EvasObject { public: @@ -407,3 +411,7 @@ WAYLAND_ELM_HARNESS_TEST_CASE(ListUserActivatedTest, "List") WAYLAND_ELM_HARNESS_TEST_CASE(ListUserDoubleClickTest, "List") WAYLAND_ELM_HARNESS_TEST_CASE(ListUserKeyScrollTest, "List") WAYLAND_ELM_HARNESS_TEST_CASE(ListUserMouseScrollTest, "List") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_map.cpp b/src/test/efl/test_map.cpp index 2ccfb14..13f5863 100644 --- a/src/test/efl/test_map.cpp +++ b/src/test/efl/test_map.cpp @@ -22,6 +22,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Map : public EvasObject { public: @@ -42,3 +46,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(MapResizeTest, "Map") WAYLAND_ELM_HARNESS_TEST_CASE(MapPositionTest, "Map") WAYLAND_ELM_HARNESS_TEST_CASE(MapVisibilityTest, "Map") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_mapbuf.cpp b/src/test/efl/test_mapbuf.cpp index 333bf52..f7bf6d0 100644 --- a/src/test/efl/test_mapbuf.cpp +++ b/src/test/efl/test_mapbuf.cpp @@ -22,6 +22,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Mapbuf : public EvasObject { public: @@ -42,3 +46,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(MapbufResizeTest, "Mapbuf") WAYLAND_ELM_HARNESS_TEST_CASE(MapbufPositionTest, "Mapbuf") WAYLAND_ELM_HARNESS_TEST_CASE(MapbufVisibilityTest, "Mapbuf") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_notify.cpp b/src/test/efl/test_notify.cpp index a95203f..0a18177 100644 --- a/src/test/efl/test_notify.cpp +++ b/src/test/efl/test_notify.cpp @@ -27,6 +27,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Notify : public EvasObject { public: @@ -314,3 +318,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(NotifyOrientTest, "Notify") WAYLAND_ELM_HARNESS_TEST_CASE(NotifyUserClickTest, "Notify") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_panel.cpp b/src/test/efl/test_panel.cpp index 046c335..ad74497 100644 --- a/src/test/efl/test_panel.cpp +++ b/src/test/efl/test_panel.cpp @@ -24,6 +24,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Panel : public EvasObject { public: @@ -138,3 +142,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(PanelVisibilityTest, "Panel") WAYLAND_ELM_HARNESS_TEST_CASE(PanelOrientTest, "Panel") //WAYLAND_ELM_HARNESS_TEST_CASE(PanelToggleTest, "Panel") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_popup.cpp b/src/test/efl/test_popup.cpp index 9524e2b..33e418b 100644 --- a/src/test/efl/test_popup.cpp +++ b/src/test/efl/test_popup.cpp @@ -25,6 +25,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Popup : public EvasObject { public: @@ -173,3 +177,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(PopupPositionTest, "Popup") WAYLAND_ELM_HARNESS_TEST_CASE(PopupVisibilityTest, "Popup") WAYLAND_ELM_HARNESS_TEST_CASE(PopupTimeoutTest, "Popup") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_progressbar.cpp b/src/test/efl/test_progressbar.cpp index d0aeaf7..08d7fd5 100644 --- a/src/test/efl/test_progressbar.cpp +++ b/src/test/efl/test_progressbar.cpp @@ -22,6 +22,10 @@ #include "templates.h" +namespace wfits { +namespace test { +namespace efl { + class Progressbar : public EvasObject { public: @@ -220,3 +224,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(ProgressbarValueTest, "Progressbar") WAYLAND_ELM_HARNESS_TEST_CASE(ProgressbarPulseTest, "Progressbar") WAYLAND_ELM_HARNESS_TEST_CASE(ProgressbarInvertedTest, "Progressbar") +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_window.cpp b/src/test/efl/test_window.cpp index 2d604b0..6518bcf 100644 --- a/src/test/efl/test_window.cpp +++ b/src/test/efl/test_window.cpp @@ -25,6 +25,10 @@ #include "window.h" #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + using std::vector; class WindowIconifyTest : public ElmTestHarness @@ -372,3 +376,6 @@ WAYLAND_ELM_HARNESS_TEST_CASE(WindowAlphaTest, "Window") WAYLAND_ELM_HARNESS_TEST_CASE(WindowIndicatorTest, "Window") WAYLAND_ELM_HARNESS_TEST_CASE(WindowIndicatorOpacityTest, "Window") +} // namespace efl +} // namespace test +} // namespace wfitsv diff --git a/src/test/efl/test_window_fullscreen.cpp b/src/test/efl/test_window_fullscreen.cpp index d19246a..e142cca 100644 --- a/src/test/efl/test_window_fullscreen.cpp +++ b/src/test/efl/test_window_fullscreen.cpp @@ -23,6 +23,10 @@ #include "window.h" #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + class WindowFullscreenTest : public ElmTestHarness { public: @@ -198,3 +202,7 @@ private: }; WAYLAND_ELM_HARNESS_TEST_CASE(WindowFullscreenTest, "Window") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_window_maximize.cpp b/src/test/efl/test_window_maximize.cpp index e1eab00..4e98867 100644 --- a/src/test/efl/test_window_maximize.cpp +++ b/src/test/efl/test_window_maximize.cpp @@ -23,6 +23,10 @@ #include "window.h" #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + class WindowMaximizeTest : public ElmTestHarness { public: @@ -194,3 +198,7 @@ private: }; WAYLAND_ELM_HARNESS_TEST_CASE(WindowMaximizeTest, "Window") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_window_move.cpp b/src/test/efl/test_window_move.cpp index 05f4fda..30422b2 100644 --- a/src/test/efl/test_window_move.cpp +++ b/src/test/efl/test_window_move.cpp @@ -23,6 +23,10 @@ #include "window.h" #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + class WindowMoveTest : public ElmTestHarness { public: @@ -110,3 +114,7 @@ private: }; WAYLAND_ELM_HARNESS_TEST_CASE(WindowMoveTest, "Window") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/test_window_resize.cpp b/src/test/efl/test_window_resize.cpp index 64597a2..902ef2c 100644 --- a/src/test/efl/test_window_resize.cpp +++ b/src/test/efl/test_window_resize.cpp @@ -23,6 +23,10 @@ #include "window.h" #include "elmtestharness.h" +namespace wfits { +namespace test { +namespace efl { + class WindowResizeTest : public ElmTestHarness { public: @@ -115,3 +119,7 @@ private: }; WAYLAND_ELM_HARNESS_TEST_CASE(WindowResizeTest, "Window") + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/window.cpp b/src/test/efl/window.cpp index 839806b..166ffab 100644 --- a/src/test/efl/window.cpp +++ b/src/test/efl/window.cpp @@ -26,6 +26,10 @@ #include "window.h" #include "application.h" +namespace wfits { +namespace test { +namespace efl { + Window::Window(const std::string& name, const std::string& title, const unsigned width, const unsigned height) : EvasObject::EvasObject( elm_win_util_standard_add(name.c_str(), title.c_str()) @@ -128,3 +132,7 @@ void Window::checkRotation(const int expected) const { FAIL_UNLESS_EQUAL(this->getRotation(), expected); } + +} // namespace efl +} // namespace test +} // namespace wfits diff --git a/src/test/efl/window.h b/src/test/efl/window.h index 41e2195..81fe6f2 100644 --- a/src/test/efl/window.h +++ b/src/test/efl/window.h @@ -29,6 +29,10 @@ struct wl_surface; +namespace wfits { +namespace test { +namespace efl { + class Window : public EvasObject { public: @@ -59,5 +63,9 @@ public: wl_surface* get_wl_surface(); }; +} // namespace efl +} // namespace test +} // namespace wfits + #endif diff --git a/src/test/harness.cpp b/src/test/harness.cpp index 777c46c..d87b8ae 100644 --- a/src/test/harness.cpp +++ b/src/test/harness.cpp @@ -25,23 +25,23 @@ namespace wfits { namespace test { -TestHarness::TestHarness() +Harness::Harness() : steps_() { return; } -TestHarness::~TestHarness() +Harness::~Harness() { return; } -void TestHarness::queueStep(TestStep step) +void Harness::queueStep(TestStep step) { steps_.push_back(step); } -void TestHarness::run() +void Harness::run() { setup(); @@ -51,19 +51,19 @@ void TestHarness::run() teardown(); } -bool TestHarness::haveStep() const +bool Harness::haveStep() const { return not steps_.empty(); } -void TestHarness::runNextStep() +void Harness::runNextStep() { TestStep step(steps_.front()); steps_.pop_front(); step(); } -Geometry TestHarness::getSurfaceGeometry(wl_surface *surface) +Geometry Harness::getSurfaceGeometry(wl_surface *surface) { Client::QueryRequest* request = client().makeGeometryRequest(surface); @@ -78,7 +78,7 @@ Geometry TestHarness::getSurfaceGeometry(wl_surface *surface) return result; } -Position TestHarness::getGlobalPointerPosition() const +Position Harness::getGlobalPointerPosition() const { Client::QueryRequest* request = client().makePointerPositionRequest(); @@ -93,7 +93,7 @@ Position TestHarness::getGlobalPointerPosition() const return result; } -void TestHarness::expectGlobalPointerPosition(int32_t x, int32_t y) const +void Harness::expectGlobalPointerPosition(int32_t x, int32_t y) const { Position actual(getGlobalPointerPosition()); while (actual.x != x or actual.y != y) @@ -102,23 +102,23 @@ void TestHarness::expectGlobalPointerPosition(int32_t x, int32_t y) const } } -void TestHarness::expectGlobalPointerPosition(const Position& p) const +void Harness::expectGlobalPointerPosition(const Position& p) const { expectGlobalPointerPosition(p.x, p.y); } -void TestHarness::setGlobalPointerPosition(int32_t x, int32_t y) const +void Harness::setGlobalPointerPosition(int32_t x, int32_t y) const { client().movePointerTo(x, y); expectGlobalPointerPosition(x, y); } -void TestHarness::setGlobalPointerPosition(const Position& p) const +void Harness::setGlobalPointerPosition(const Position& p) const { setGlobalPointerPosition(p.x, p.y); } -void TestHarness::inputKeySend(int32_t key, int32_t state) const +void Harness::inputKeySend(int32_t key, int32_t state) const { client().sendKey(key, state); } diff --git a/src/test/harness.h b/src/test/harness.h index 5156732..a1f3dce 100644 --- a/src/test/harness.h +++ b/src/test/harness.h @@ -30,15 +30,15 @@ namespace wfits { namespace test { -class TestHarness +class Harness { public: typedef boost::function TestStep; typedef std::deque TestSteps; - TestHarness(); + Harness(); - virtual ~TestHarness(); + virtual ~Harness(); virtual void queueStep(TestStep); -- 2.7.4