Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: third_party/crashpad/crashpad/test/win/win_child_process_test.cc

Issue 2804713002: Update Crashpad to b4095401639ebe2ad33169e5c1d994065cbff1b8 (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/test/win/win_child_process_test.cc
diff --git a/third_party/crashpad/crashpad/test/win/win_child_process_test.cc b/third_party/crashpad/crashpad/test/win/win_child_process_test.cc
index e464c7c047a8cb2ae854676d89a18079a6c60819..eb38ba98b14c725172f4a988f3c7e61c289c9fba 100644
--- a/third_party/crashpad/crashpad/test/win/win_child_process_test.cc
+++ b/third_party/crashpad/crashpad/test/win/win_child_process_test.cc
@@ -28,7 +28,7 @@ int ReadInt(HANDLE handle) {
int value = 0;
DWORD bytes_read = 0;
EXPECT_TRUE(::ReadFile(handle, &value, sizeof(value), &bytes_read, nullptr));
- EXPECT_EQ(sizeof(value), bytes_read);
+ EXPECT_EQ(bytes_read, sizeof(value));
return value;
}
@@ -36,7 +36,7 @@ void WriteInt(HANDLE handle, int value) {
DWORD bytes_written = 0;
EXPECT_TRUE(
::WriteFile(handle, &value, sizeof(value), &bytes_written, nullptr));
- EXPECT_EQ(sizeof(value), bytes_written);
+ EXPECT_EQ(bytes_written, sizeof(value));
}
class TestWinChildProcess final : public WinChildProcess {
@@ -61,7 +61,7 @@ TEST(WinChildProcessTest, WinChildProcess) {
std::unique_ptr<WinChildProcess::Handles> handles = WinChildProcess::Launch();
WriteInt(handles->write.get(), 1);
- ASSERT_EQ(1, ReadInt(handles->read.get()));
+ ASSERT_EQ(ReadInt(handles->read.get()), 1);
}
TEST(WinChildProcessTest, MultipleChildren) {
@@ -77,9 +77,9 @@ TEST(WinChildProcessTest, MultipleChildren) {
WriteInt(handles_1->write.get(), 1);
WriteInt(handles_2->write.get(), 2);
WriteInt(handles_3->write.get(), 3);
- ASSERT_EQ(3, ReadInt(handles_3->read.get()));
- ASSERT_EQ(2, ReadInt(handles_2->read.get()));
- ASSERT_EQ(1, ReadInt(handles_1->read.get()));
+ ASSERT_EQ(ReadInt(handles_3->read.get()), 3);
+ ASSERT_EQ(ReadInt(handles_2->read.get()), 2);
+ ASSERT_EQ(ReadInt(handles_1->read.get()), 1);
}
} // namespace
« no previous file with comments | « third_party/crashpad/crashpad/test/win/win_child_process.cc ('k') | third_party/crashpad/crashpad/test/win/win_multiprocess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698