#include "compositor.h"
+namespace wfits {
+namespace test {
+namespace core {
+
Compositor::Compositor(const Display& display)
: display_(display)
, wl_compositor_(
FAIL_IF((wl_compositor*)compositor == NULL);
FAIL_UNLESS_EQUAL(wl_compositor_get_user_data(compositor), &compositor);
}
+
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "display.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class Compositor
{
public:
wl_compositor *wl_compositor_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "display.h"
+namespace wfits {
+namespace test {
+namespace core {
+
Display::Display()
: wl_display_(wl_display_connect(0))
, wl_registry_(NULL)
ASSERT(not wl_display_get_error(display));
}
+
+} // namespace core
+} // namespace test
+} // namespace wfits
#include <wayland-client.h>
#include "test/tools.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class Display
{
typedef std::pair<uint32_t, uint32_t> GlobalInfo;
Globals globals_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#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;
unsigned tested;
};
-class GlobalPointerTest : public CoreTestHarness
+class GlobalPointerTest : public Harness
{
public:
void setup()
WFITS_CORE_HARNESS_TEST_CASE(SimpleTest, "Harness")
WFITS_CORE_HARNESS_TEST_CASE(GlobalPointerTest, "Harness")
+} // namespace core
+} // namespace test
+} // namespace wfits
#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;
#define WFITS_CORE_HARNESS_TEST_CASE(HarnessClass, suite) \
HARNESS_TEST(HarnessClass, "Core/" suite)
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "surface.h"
#include "pointer.h"
+namespace wfits {
+namespace test {
+namespace core {
+
Pointer::Pointer(const Seat& seat)
: seat_(seat)
, focus_(NULL)
FAIL_UNLESS(pointer.hasFocus(NULL));
}
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "seat.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class Surface;
class Pointer
wl_pointer* wl_pointer_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "seat.h"
+namespace wfits {
+namespace test {
+namespace core {
+
Seat::Seat(const Display& display)
: display_(display)
, wl_seat_(display.bind<wl_seat>("wl_seat", &wl_seat_interface))
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
#include "display.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class Seat
{
public:
uint32_t capabilities_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "shell.h"
+namespace wfits {
+namespace test {
+namespace core {
+
Shell::Shell(const Display& display)
: display_(display)
, wl_shell_(
FAIL_IF((wl_shell*)shell == NULL);
FAIL_UNLESS_EQUAL(wl_shell_get_user_data(shell), &shell);
}
+
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "display.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class Shell
{
public:
wl_shell *wl_shell_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "shell_surface.h"
+namespace wfits {
+namespace test {
+namespace core {
+
ShellSurface::ShellSurface(const Shell& shell, const Surface& surface)
: shell_(shell)
, surface_(surface)
FAIL_UNLESS_EQUAL(wl_shell_surface_get_user_data(ss), &ss);
}
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "shell.h"
#include "surface.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class ShellSurface
{
public:
wl_shell_surface *wl_shell_surface_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include <sys/mman.h>
#include "shm.h"
+namespace wfits {
+namespace test {
+namespace core {
+
SharedMemory::SharedMemory(const Display& display)
: display_(display)
, wl_shm_(display.bind<wl_shm>("wl_shm", &wl_shm_interface))
FAIL_UNLESS_EQUAL(buffer.stride(), 4*24);
FAIL_UNLESS_EQUAL(buffer.size(), 4*24*13);
}
+
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "display.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class SharedMemory
{
public:
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "surface.h"
+namespace wfits {
+namespace test {
+namespace core {
+
Surface::Surface(const Compositor& compositor)
: compositor_(compositor)
, wl_surface_(
FAIL_IF((wl_surface*)surface == NULL);
FAIL_UNLESS_EQUAL(wl_surface_get_user_data(surface), &surface);
}
+
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "compositor.h"
+namespace wfits {
+namespace test {
+namespace core {
+
class Surface
{
public:
wl_surface *wl_surface_;
};
+} // namespace core
+} // namespace test
+} // namespace wfits
+
#endif
#include "harness.h"
+namespace wfits {
+namespace test {
+namespace core {
+
template <typename O, const wl_interface& interface, const std::string& str_interface>
-class BindInterface : public CoreTestHarness
+class BindInterface : public Harness
{
public:
BindInterface()
- : CoreTestHarness::CoreTestHarness()
+ : Harness::Harness()
, object_(NULL)
{
return;
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
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <boost/bind.hpp>
#include <wayland-cursor.h>
#include "harness.h"
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", &wl_shm_interface))
{
ASSERT(shm_ != NULL);
WFITS_CORE_HARNESS_TEST_CASE(ThemeLoadTest, "Cursor");
+} // namespace core
+} // namespace test
+} // namespace wfits
#include <wayland-client-protocol.h>
#include "harness.h"
+namespace wfits {
+namespace test {
+namespace core {
+
template <typename O>
-class DataTest : public CoreTestHarness
+class DataTest : public Harness
{
public:
virtual void setup()
DATA_TEST(wl_seat)
DATA_TEST(wl_shell)
DATA_TEST(wl_data_device_manager)
+
+} // namespace core
+} // namespace test
+} // namespace wfits
#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())
WFITS_CORE_HARNESS_TEST_CASE(SurfacePointerTest, "Input");
+} // namespace core
+} // namespace test
+} // namespace wfits
#include "application.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
Application::Application()
{
elm_init(
usleep(time);
}
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "test/tools.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Application
{
public:
static void yield(const unsigned time = 0.01 * 1e6);
};
+} // namespace efl
+} // namespace test
+} // namespace wfits
+
#endif
#include "background.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using boost::filesystem::path;
Background::Background(EvasObject& parent)
return elm_bg_option_get(*this);
}
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include <Elementary.h>
#include "evasobject.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Background : public EvasObject
{
public:
Elm_Bg_Option getImageOpt();
};
+} // namespace efl
+} // namespace test
+} // namespace wfits
+
#endif
#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)
{
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;
}
return ECORE_CALLBACK_DONE;
}
+
+class SimpleTest : public ElmTestHarness
+{
+public:
+};
+
+WAYLAND_ELM_HARNESS_TEST_CASE(SimpleTest, "Harness")
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
#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<bool (void)> Condition;
- typedef ::wfits::test::TestHarness::TestStep TestStep;
- using ::wfits::test::TestHarness::queueStep;
+ using test::Harness::queueStep;
/**
* Construct the test harness.
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);
};
#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
#include "evasobject.h"
#include "test/tools.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
EvasObject::EvasObject(Evas_Object* o, bool autodel)
: obj_(o)
, autodel_(autodel)
FAIL_UNLESS_EQUAL(this->isVisible(), isVisible);
}
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include <Evas.h>
#include "common/util.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class EvasObject
{
public:
bool autodel_;
};
+} // namespace efl
+} // namespace test
+} // namespace wfits
+
#endif
#include "evasobject.h"
#include "window.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
template <typename T>
class ResizeObjectTest : public ElmTestHarness
{
};
*/
+} // namespace efl
+} // namespace test
+} // namespace wfits
+
#endif
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
class Actionslider : public EvasObject
WAYLAND_ELM_HARNESS_TEST_CASE(ActionsliderIndicatorTest, "ActionSlider")
WAYLAND_ELM_HARNESS_TEST_CASE(ActionSliderUserTest, "ActionSlider")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using boost::filesystem::path;
using std::vector;
WAYLAND_ELM_HARNESS_TEST_CASE(BackgroundColorTest, "Background")
WAYLAND_ELM_HARNESS_TEST_CASE(BackgroundImageTest, "Background")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
using std::string;
WAYLAND_ELM_HARNESS_TEST_CASE(BubbleUserClickTest, "Bubble")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include <linux/input.h>
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
class Button : public EvasObject
WAYLAND_ELM_HARNESS_TEST_CASE(ButtonPositionTest, "Button")
WAYLAND_ELM_HARNESS_TEST_CASE(ButtonVisibilityTest, "Button")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Check : public EvasObject
{
public:
// WAYLAND_ELM_HARNESS_TEST_CASE(CheckPartTextOnTest, "Check")
// WAYLAND_ELM_HARNESS_TEST_CASE(CheckPartTextOffTest, "Check")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Clock : public EvasObject
{
public:
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
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class ColorselectorColorTest : public ElmTestHarness
{
public:
};
WAYLAND_ELM_HARNESS_TEST_CASE(ColorselectorColorTest, "ColorSelector")
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
class Dayselector : public EvasObject
WAYLAND_ELM_HARNESS_TEST_CASE(DayselectorDayTest, "DaySelector")
WAYLAND_ELM_HARNESS_TEST_CASE(DayselectorLocaleTest, "DaySelector")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include <Elementary.h>
#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
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::string;
using std::vector;
WAYLAND_ELM_HARNESS_TEST_CASE(EntryCopyTest, "Entry")
WAYLAND_ELM_HARNESS_TEST_CASE(EntryPasteTest, "Entry")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
class Fileselector : public EvasObject
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
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
class FileselectorButton : public EvasObject
WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorButtonIsSaveTest, "FileSelectorButton")
WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorButtonInwinTest, "FileSelectorButton")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
// TODO: FileselectorEntry and FileselectorButton share a lot of commonality
WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorEntryIsSaveTest, "FileSelectorEntry")
WAYLAND_ELM_HARNESS_TEST_CASE(FileselectorEntryInwinTest, "FileSelectorEntry")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "background.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using boost::filesystem::path;
using std::vector;
WAYLAND_ELM_HARNESS_TEST_CASE(FlipPositionTest, "Flip")
WAYLAND_ELM_HARNESS_TEST_CASE(FlipVisibilityTest, "Flip")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
using std::string;
WAYLAND_ELM_HARNESS_TEST_CASE(FlipSelectorPositionTest, "FlipSelector")
WAYLAND_ELM_HARNESS_TEST_CASE(FlipSelectorVisibilityTest, "FlipSelector")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Frame : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(FramePositionTest, "Frame")
WAYLAND_ELM_HARNESS_TEST_CASE(FrameVisibilityTest, "Frame")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class GLView : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_EGL_TEST_CASE(GLViewModeTest, "GLView")
WAYLAND_ELM_HARNESS_EGL_TEST_CASE(GLViewAPITest, "GLView")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "background.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
using std::string;
WAYLAND_ELM_HARNESS_TEST_CASE(HoverVisibilityTest, "Hover")
WAYLAND_ELM_HARNESS_TEST_CASE(HoverParentTargetTest, "Hover")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Hoversel : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(HoverselPositionTest, "Hoversel")
WAYLAND_ELM_HARNESS_TEST_CASE(HoverselVisibilityTest, "Hoversel")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
using std::string;
WAYLAND_ELM_HARNESS_TEST_CASE(IconVisibilityTest, "Icon")
WAYLAND_ELM_HARNESS_TEST_CASE(IconStandardTest, "Icon")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#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");
WAYLAND_ELM_HARNESS_TEST_CASE(ImageFileTest, "Image")
WAYLAND_ELM_HARNESS_TEST_CASE(ImageOrientTest, "Image")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Inwin : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(InwinPositionTest, "Inwin")
WAYLAND_ELM_HARNESS_TEST_CASE(InwinVisibilityTest, "Inwin")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#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 "
WAYLAND_ELM_HARNESS_TEST_CASE(LabelWrapTest, "Label")
WAYLAND_ELM_HARNESS_TEST_CASE(LabelWrapWidthTest, "Label")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "elmtestharness.h"
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class List : public EvasObject
{
public:
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
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Map : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(MapPositionTest, "Map")
WAYLAND_ELM_HARNESS_TEST_CASE(MapVisibilityTest, "Map")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Mapbuf : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(MapbufPositionTest, "Mapbuf")
WAYLAND_ELM_HARNESS_TEST_CASE(MapbufVisibilityTest, "Mapbuf")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Notify : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(NotifyUserClickTest, "Notify")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Panel : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(PanelOrientTest, "Panel")
//WAYLAND_ELM_HARNESS_TEST_CASE(PanelToggleTest, "Panel")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Popup : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(PopupVisibilityTest, "Popup")
WAYLAND_ELM_HARNESS_TEST_CASE(PopupTimeoutTest, "Popup")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "templates.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class Progressbar : public EvasObject
{
public:
WAYLAND_ELM_HARNESS_TEST_CASE(ProgressbarPulseTest, "Progressbar")
WAYLAND_ELM_HARNESS_TEST_CASE(ProgressbarInvertedTest, "Progressbar")
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "window.h"
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
using std::vector;
class WindowIconifyTest : public ElmTestHarness
WAYLAND_ELM_HARNESS_TEST_CASE(WindowIndicatorTest, "Window")
WAYLAND_ELM_HARNESS_TEST_CASE(WindowIndicatorOpacityTest, "Window")
+} // namespace efl
+} // namespace test
+} // namespace wfitsv
#include "window.h"
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class WindowFullscreenTest : public ElmTestHarness
{
public:
};
WAYLAND_ELM_HARNESS_TEST_CASE(WindowFullscreenTest, "Window")
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "window.h"
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class WindowMaximizeTest : public ElmTestHarness
{
public:
};
WAYLAND_ELM_HARNESS_TEST_CASE(WindowMaximizeTest, "Window")
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "window.h"
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class WindowMoveTest : public ElmTestHarness
{
public:
};
WAYLAND_ELM_HARNESS_TEST_CASE(WindowMoveTest, "Window")
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
#include "window.h"
#include "elmtestharness.h"
+namespace wfits {
+namespace test {
+namespace efl {
+
class WindowResizeTest : public ElmTestHarness
{
public:
};
WAYLAND_ELM_HARNESS_TEST_CASE(WindowResizeTest, "Window")
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
#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())
{
FAIL_UNLESS_EQUAL(this->getRotation(), expected);
}
+
+} // namespace efl
+} // namespace test
+} // namespace wfits
struct wl_surface;
+namespace wfits {
+namespace test {
+namespace efl {
+
class Window : public EvasObject
{
public:
wl_surface* get_wl_surface();
};
+} // namespace efl
+} // namespace test
+} // namespace wfits
+
#endif
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();
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);
return result;
}
-Position TestHarness::getGlobalPointerPosition() const
+Position Harness::getGlobalPointerPosition() const
{
Client::QueryRequest* request = client().makePointerPositionRequest();
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)
}
}
-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);
}
namespace wfits {
namespace test {
-class TestHarness
+class Harness
{
public:
typedef boost::function<void()> TestStep;
typedef std::deque<TestStep> TestSteps;
- TestHarness();
+ Harness();
- virtual ~TestHarness();
+ virtual ~Harness();
virtual void queueStep(TestStep);