RESOLVED FIXED 98142
[EFL][WK2] Use correct gtest macro for testing true/false
https://bugs.webkit.org/show_bug.cgi?id=98142
Summary [EFL][WK2] Use correct gtest macro for testing true/false
Jinwoo Song
Reported 2012-10-02 04:20:02 PDT
Using EXPECT_EQ(true/false, ...) makes clang trip when it tries to convert true/false to a pointer. Tests should use EXPECT_TRUE/FALSE instead.
Attachments
Patch (9.73 KB, patch)
2012-10-02 04:33 PDT, Jinwoo Song
no flags
Jinwoo Song
Comment 1 2012-10-02 04:33:25 PDT
Raphael Kubo da Costa (:rakuco)
Comment 2 2012-10-02 04:48:01 PDT
Comment on attachment 166663 [details] Patch Looks OK.
Chris Dumez
Comment 3 2012-10-02 05:01:29 PDT
Comment on attachment 166663 [details] Patch LGTM.
Chris Dumez
Comment 4 2012-10-02 05:07:20 PDT
I'm guessing this patch fixes the following compilation warnings? /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In function 'Eina_Bool showPopupMenu(Ewk_View_Smart_Data*, Eina_Rectangle, Ewk_Text_Direction, double, Eina_List*, int)': /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:223:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In member function 'virtual void EWK2UnitTestBase_ewk_view_run_javascript_alert_Test::TestBody()': /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:462:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In member function 'virtual void EWK2UnitTestBase_ewk_view_run_javascript_confirm_Test::TestBody()': /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:526:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In member function 'virtual void EWK2UnitTestBase_ewk_view_run_javascript_prompt_Test::TestBody()': /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:626:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null]
Jinwoo Song
Comment 5 2012-10-02 05:09:33 PDT
(In reply to comment #4) > I'm guessing this patch fixes the following compilation warnings? > > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In function 'Eina_Bool showPopupMenu(Ewk_View_Smart_Data*, Eina_Rectangle, Ewk_Text_Direction, double, Eina_List*, int)': > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:223:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In member function 'virtual void EWK2UnitTestBase_ewk_view_run_javascript_alert_Test::TestBody()': > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:462:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In member function 'virtual void EWK2UnitTestBase_ewk_view_run_javascript_confirm_Test::TestBody()': > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:526:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp: In member function 'virtual void EWK2UnitTestBase_ewk_view_run_javascript_prompt_Test::TestBody()': > /home/chris/Devel/WebKit/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:626:158: warning: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Wconversion-null] Yes, that's right!
Laszlo Gombos
Comment 6 2012-10-02 06:35:57 PDT
Comment on attachment 166663 [details] Patch r=me.
WebKit Review Bot
Comment 7 2012-10-02 07:05:46 PDT
Comment on attachment 166663 [details] Patch Clearing flags on attachment: 166663 Committed r130166: <http://trac.webkit.org/changeset/130166>
WebKit Review Bot
Comment 8 2012-10-02 07:05:51 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.