From: Joe Konno Date: Thu, 19 Jul 2012 23:33:59 +0000 (-0700) Subject: EFL: moderate refactor of button tests X-Git-Tag: upstream/0.2.1~289 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da7de1cf6085fcee4f044d9609fcd53b83008e01;p=test%2Fgeneric%2Fwayland-fits.git EFL: moderate refactor of button tests Utilize EvasObject convenience macros. Signed-off-by: Joe Konno --- diff --git a/src/efl/test_button.cpp b/src/efl/test_button.cpp index 3340d7c..06e1811 100644 --- a/src/efl/test_button.cpp +++ b/src/efl/test_button.cpp @@ -22,25 +22,8 @@ public: window_.show(); button_.show(); - queueCallback( - ModifyCheckCallback( - boost::bind(&EvasObject::setSize, boost::ref(button_), 75, 75), - boost::bind(&ButtonResizeTest::checkSize, boost::ref(*this), 75, 75) - ) - ); - - queueCallback( - ModifyCheckCallback( - boost::bind(&EvasObject::setSize, boost::ref(button_), 120, 30), - boost::bind(&ButtonResizeTest::checkSize, boost::ref(*this), 120, 30) - ) - ); - } - - void checkSize(unsigned w, unsigned h) - { - BOOST_CHECK_EQUAL(button_.getWidth(), w); - BOOST_CHECK_EQUAL(button_.getHeight(), h); + SET_CHECK_SIZE(button_, 75, 75); + SET_CHECK_SIZE(button_, 120, 30); } private: @@ -64,25 +47,8 @@ public: window_.show(); button_.show(); - queueCallback( - ModifyCheckCallback( - boost::bind(&EvasObject::setPosition, boost::ref(button_), 60, 15), - boost::bind(&ButtonMoveTest::checkPosition, boost::ref(*this), 60, 15) - ) - ); - - queueCallback( - ModifyCheckCallback( - boost::bind(&EvasObject::setPosition, boost::ref(button_), 10, 10), - boost::bind(&ButtonMoveTest::checkPosition, boost::ref(*this), 10, 10) - ) - ); - } - - void checkPosition(unsigned x, unsigned y) - { - BOOST_CHECK_EQUAL(button_.getX(), x); - BOOST_CHECK_EQUAL(button_.getY(), y); + SET_CHECK_POSITION(button_, 60, 15); + SET_CHECK_POSITION(button_, 10, 10); } private: