Bug 98142 - [EFL][WK2] Use correct gtest macro for testing true/false
Summary: [EFL][WK2] Use correct gtest macro for testing true/false
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jinwoo Song
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 04:20 PDT by Jinwoo Song
Modified: 2012-10-02 07:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (9.73 KB, patch)
2012-10-02 04:33 PDT, Jinwoo Song
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jinwoo Song 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.
Comment 1 Jinwoo Song 2012-10-02 04:33:25 PDT
Created attachment 166663 [details]
Patch
Comment 2 Raphael Kubo da Costa (:rakuco) 2012-10-02 04:48:01 PDT
Comment on attachment 166663 [details]
Patch

Looks OK.
Comment 3 Chris Dumez 2012-10-02 05:01:29 PDT
Comment on attachment 166663 [details]
Patch

LGTM.
Comment 4 Chris Dumez 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]
Comment 5 Jinwoo Song 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!
Comment 6 Laszlo Gombos 2012-10-02 06:35:57 PDT
Comment on attachment 166663 [details]
Patch

r=me.
Comment 7 WebKit Review Bot 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>
Comment 8 WebKit Review Bot 2012-10-02 07:05:51 PDT
All reviewed patches have been landed.  Closing bug.