Bug 230368 - [API Tests] EXPECT_* macros should be used with the expected values first
Summary: [API Tests] EXPECT_* macros should be used with the expected values first
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-16 12:35 PDT by Wenson Hsieh
Modified: 2021-09-23 12:35 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2021-09-16 12:35:03 PDT
e.g. EXPECT_EQ(expected, actual) vs. the opposite.

Some of our tests flip this order, which can make failure output difficult to understand.
Comment 1 Darin Adler 2021-09-16 12:38:45 PDT
Side note: Same applies to the gtest ASSERT macros; they are the same except that they stop the entire test if the assertion fails. I suspect in many cases we are using ASSERT where we should instead be using EXPECT, and likely we have the same backwards mistake.
Comment 2 Radar WebKit Bug Importer 2021-09-23 12:35:19 PDT
<rdar://problem/83460692>