crashpad/client
Mark Mentovai 4b450c8137 test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE}
gtest used to require (expected, actual) ordering for arguments to
EXPECT_EQ and ASSERT_EQ, and in failed test assertions would identify
each side as “expected” or “actual.” Tests in Crashpad adhered to this
traditional ordering. After a gtest change in February 2016, it is now
agnostic with respect to the order of these arguments.

This change mechanically updates all uses of these macros to (actual,
expected) by reversing them. This provides consistency with our use of
the logging CHECK_EQ and DCHECK_EQ macros, and makes for better
readability by ordinary native speakers. The rough (but working!)
conversion tool is
https://chromium-review.googlesource.com/c/466727/1/rewrite_expectassert_eq.py,
and “git cl format” cleaned up its output.

EXPECT_NE and ASSERT_NE never had a preferred ordering. gtest never made
a judgment that one side or the other needed to provide an “unexpected”
value. Consequently, some code used (unexpected, actual) while other
code used (actual, unexpected). For consistency with the new EXPECT_EQ
and ASSERT_EQ usage, as well as consistency with CHECK_NE and DCHECK_NE,
this change also updates these use sites to (actual, unexpected) where
one side can be called “unexpected” as, for example, std::string::npos
can be. Unfortunately, this portion was a manual conversion.

References:

https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#binary-comparison
77d6b17338
https://github.com/google/googletest/pull/713

Change-Id: I978fef7c94183b8b1ef63f12f5ab4d6693626be3
Reviewed-on: https://chromium-review.googlesource.com/466727
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-04-04 12:34:24 +00:00
..
capture_context_mac.S capture_context_mac (32-bit x86): Comments and code should agree more 2015-09-10 15:15:19 -04:00
capture_context_mac.h C++11: Use type aliases instead of typedefs. 2014-11-05 14:09:01 -05:00
capture_context_mac_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
client.gyp Omit platform-specific assembler source from builds as needed 2016-11-01 21:17:02 +00:00
client_test.gyp Fix the race causing flaky CrashpadClient tests. 2017-03-24 19:46:24 +00:00
crash_report_database.cc Adding support for on-demand uploads. 2016-08-24 21:57:02 +00:00
crash_report_database.h Add metrics for tracking uploads 2016-09-26 22:09:32 +00:00
crash_report_database_mac.mm Set FD_CLOEXEC on file descriptors obtained from open() and fopen() 2017-02-28 21:16:41 +00:00
crash_report_database_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
crash_report_database_win.cc Make file_io reads more rational and predictable 2017-03-16 20:07:43 +00:00
crashpad_client.h mac: Add CrashpadClient::GetHandlerMachPort() 2017-03-09 00:44:58 +00:00
crashpad_client_mac.cc mac: Add CrashpadClient::GetHandlerMachPort() 2017-03-09 00:44:58 +00:00
crashpad_client_win.cc win: Add timeout argument to WaitForHandlerStart() 2016-12-13 16:47:34 +00:00
crashpad_client_win_test.cc “Promote” test::Paths::Executable() to Paths::Executable() 2017-04-03 18:58:01 +00:00
crashpad_info.cc Use ADDRESS_SANITIZER instead of __has_feature(address_sanitizer) 2016-11-22 19:28:06 +00:00
crashpad_info.h doc: Fix all Doxygen warnings, cleaning up some generated documentation 2016-11-08 19:24:05 +00:00
prune_crash_reports.cc Convert from scoped_ptr to std::unique_ptr 2016-04-25 19:16:26 +00:00
prune_crash_reports.h doc: Fix all Doxygen warnings, cleaning up some generated documentation 2016-11-08 19:24:05 +00:00
prune_crash_reports_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
settings.cc Make file_io reads more rational and predictable 2017-03-16 20:07:43 +00:00
settings.h Use base/macros.h instead of base/basictypes.h 2016-01-06 12:22:50 -05:00
settings_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
simple_address_range_bag.cc Support client-specified extra memory ranges 2016-02-29 22:16:13 +00:00
simple_address_range_bag.h Support client-specified extra memory ranges 2016-02-29 22:16:13 +00:00
simple_address_range_bag_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
simple_string_dictionary.cc C++11: Use type aliases instead of typedefs. 2014-11-05 14:09:01 -05:00
simple_string_dictionary.h Support client-specified extra memory ranges 2016-02-29 22:16:13 +00:00
simple_string_dictionary_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
simulate_crash.h win: Implement CRASHPAD_SIMULATE_CRASH() 2015-09-25 13:45:32 -07:00
simulate_crash_mac.cc Use base/macros.h instead of base/basictypes.h 2016-01-06 12:22:50 -05:00
simulate_crash_mac.h Use references instead of pointers for CPU context in SimulateCrash 2015-09-25 16:26:29 -04:00
simulate_crash_mac_test.cc test: Use (actual, [un]expected) in gtest {ASSERT,EXPECT}_{EQ,NE} 2017-04-04 12:34:24 +00:00
simulate_crash_win.h win: Let Doxygen see CRASHPAD_SIMULATE_CRASH() 2015-11-02 12:19:44 -05:00