Bug 148073

Summary: Fix conversion-null warning in conversion.cpp of TestWebKitAPI
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: Tools / TestsAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Gyuyoung Kim 2015-08-16 19:22:42 PDT
When building EFL port, there is conversion-null build warning.


[5131/5306] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/Condition.cpp.o
../../Tools/TestWebKitAPI/Tests/WTF/Condition.cpp: In member function ‘virtual void TestWebKitAPI::WTF_Condition_TimeoutTimesOut_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:253:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, result);
                                                                                                                                                              ^
[5306/5306] Linking CXX executable bin/TestWebKitAPI/WebKit2/WillSendSubmitEvent
Comment 1 Gyuyoung Kim 2015-08-16 19:23:54 PDT
Created attachment 259134 [details]
Patch
Comment 2 Alexey Proskuryakov 2015-08-17 18:06:57 PDT
Comment on attachment 259134 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=259134&action=review

> Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:253
> -    EXPECT_EQ(false, result);
> +    EXPECT_EQ(result, false);

According to documentation, the order is correct: EXPECT_EQ(expected, actual). This needs a different fix.
Comment 3 Gyuyoung Kim 2015-08-18 00:50:55 PDT
Created attachment 259258 [details]
Patch
Comment 4 Gyuyoung Kim 2015-08-18 00:51:56 PDT
(In reply to comment #2)
> Comment on attachment 259134 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259134&action=review
> 
> > Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:253
> > -    EXPECT_EQ(false, result);
> > +    EXPECT_EQ(result, false);
> 
> According to documentation, the order is correct: EXPECT_EQ(expected,
> actual). This needs a different fix.

Yes, we should use EXPECT_FALSE|TRUE when checking boolean instead of EXPECT_EQ.
Comment 5 WebKit Commit Bot 2015-08-18 18:25:39 PDT
Comment on attachment 259258 [details]
Patch

Clearing flags on attachment: 259258

Committed r188618: <http://trac.webkit.org/changeset/188618>
Comment 6 WebKit Commit Bot 2015-08-18 18:25:42 PDT
All reviewed patches have been landed.  Closing bug.