예제 #1
0
	void test()
	{
		Position p(getGlobalPointerPosition());
		FAIL_IF_EQUAL(p.x, -1);
		FAIL_IF_EQUAL(p.y, -1);

		for (int y(0); y < 480; y += 80) {
			for (int x(0); x < 640; x += 80) {
				setGlobalPointerPosition(x, y);
				p = getGlobalPointerPosition();
				FAIL_UNLESS_EQUAL(p.x, x);
				FAIL_UNLESS_EQUAL(p.y, y);
			}
		}
	}
예제 #2
0
	void checkEmoticon(const string& expected)
	{
		const char* actual_ = elm_entry_entry_get(control_);
		string actual = actual_ != NULL ? actual_ : "";

		FAIL_UNLESS_EQUAL(actual, expected);
	}
예제 #3
0
	/**
	 * The assumption is that window fullscreening is honored by the window
	 * manager/compositor and fills the entire screen size when fullscreened.
	 * When unfullscreened, the window should restore to its initial size
	 * and position.
	 */
	void test()
	{
		gint width, height;
		GdkScreen *screen(gtk_window_get_screen(*this));
		Geometry fullscreen(
			0, 0,
			gdk_screen_get_width(screen),
			gdk_screen_get_height(screen)
		);
		const Geometry initial(getSurfaceGeometry(*this));

		std::cout << "...initial server geometry " << initial << std::endl;

		gtk_window_get_size(*this, &width, &height);

		std::cout << "...checking server size == client size" << std::endl;
		FAIL_UNLESS_EQUAL(width, initial.width);
		FAIL_UNLESS_EQUAL(height, initial.height);

		std::cout << "...checking client size != fullscreen size" << std::endl;
		FAIL_IF_EQUAL(width, fullscreen.width);
		FAIL_IF_EQUAL(height, fullscreen.height);

		isConfigured_ = false;

		std::cout << "...fullscreening client" << std::endl;
		gtk_window_fullscreen(*this);

		std::cout << "...checking for fullscreen state event" << std::endl;
		YIELD_UNTIL(isFullscreen_);

		std::cout << "...checking for configure event" << std::endl;
		YIELD_UNTIL(isConfigured_);

		std::cout << "...checking client size == fullscreen size" << std::endl;
		gtk_window_get_size(*this, &width, &height);
		FAIL_UNLESS_EQUAL(width, fullscreen.width);
		FAIL_UNLESS_EQUAL(height, fullscreen.height);

		std::cout << "...checking server geometry == fullscreen geometry" << std::endl;
		YIELD_UNTIL(isServerGeometry(fullscreen));

		isConfigured_ = false;
		std::cout << "...unfullscreening client" << std::endl;
		gtk_window_unfullscreen(*this);

		std::cout << "...checking for fullscreen state event" << std::endl;
		YIELD_UNTIL(not isFullscreen_);

		std::cout << "...checking for configure event" << std::endl;
		YIELD_UNTIL(isConfigured_);

		gtk_window_get_size(*this, &width, &height);

		std::cout << "...checking client size == initial size" << std::endl;
		FAIL_UNLESS_EQUAL(width, initial.width);
		FAIL_UNLESS_EQUAL(height, initial.height);

		std::cout << "...checking server geometry == initial geometry" << std::endl;
		YIELD_UNTIL(isServerGeometry(initial));
	}
예제 #4
0
	void checkItem(const Elm_Object_Item* item, Eina_Bool expected)
	{
		FAIL_UNLESS_EQUAL(elm_flipselector_item_selected_get(item), expected);
		FAIL_UNLESS_EQUAL(elm_flipselector_item_selected_get(pivot_), not expected);
	}
예제 #5
0
void EvasObject::checkVisible(const Eina_Bool isVisible)
{
	FAIL_UNLESS_EQUAL(this->isVisible(), isVisible);
}
예제 #6
0
	void teardown()
	{
		FAIL_UNLESS_EQUAL(tested, 10);
	}