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

Side by Side Diff: net/socket/sequenced_socket_data_unittest.cc

Issue 2163573002: Roll gtest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add checklicenses excaption. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « build/secondary/testing/gtest/BUILD.gn ('k') | testing/gtest.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 { 663 {
664 ::testing::ScopedFakeTestPartResultReporter gtest_reporter( 664 ::testing::ScopedFakeTestPartResultReporter gtest_reporter(
665 ::testing::ScopedFakeTestPartResultReporter:: 665 ::testing::ScopedFakeTestPartResultReporter::
666 INTERCEPT_ONLY_CURRENT_THREAD, 666 INTERCEPT_ONLY_CURRENT_THREAD,
667 &gtest_failures); 667 &gtest_failures);
668 AssertSyncWriteEquals(kMsg1, kLen1 - 1); 668 AssertSyncWriteEquals(kMsg1, kLen1 - 1);
669 } 669 }
670 670
671 static const char* kExpectedFailures[] = { 671 static const char* kExpectedFailures[] = {
672 "Expected: (data.length()) >= (expected_data.length())", 672 "Expected: (data.length()) >= (expected_data.length())",
673 "Value of: actual_data", 673 "To be equal to: actual_data",
674 "Value of: sock_->Write(buf.get(), len, failing_callback_)"}; 674 "To be equal to: sock_->Write(buf.get(), len, failing_callback_)"};
675 ASSERT_EQ(arraysize(kExpectedFailures), 675 ASSERT_EQ(arraysize(kExpectedFailures),
676 static_cast<size_t>(gtest_failures.size())); 676 static_cast<size_t>(gtest_failures.size()));
677 677
678 for (int i = 0; i < gtest_failures.size(); ++i) { 678 for (int i = 0; i < gtest_failures.size(); ++i) {
679 const ::testing::TestPartResult& result = 679 const ::testing::TestPartResult& result =
680 gtest_failures.GetTestPartResult(i); 680 gtest_failures.GetTestPartResult(i);
681 EXPECT_TRUE(strstr(result.message(), kExpectedFailures[i]) != NULL); 681 EXPECT_TRUE(strstr(result.message(), kExpectedFailures[i]) != NULL);
682 } 682 }
683 683
684 set_expect_eof(false); 684 set_expect_eof(false);
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 1247
1248 Resume(); 1248 Resume();
1249 ASSERT_FALSE(IsPaused()); 1249 ASSERT_FALSE(IsPaused());
1250 ASSERT_TRUE(write_callback_.have_result()); 1250 ASSERT_TRUE(write_callback_.have_result());
1251 ASSERT_EQ(kLen2, write_callback_.WaitForResult()); 1251 ASSERT_EQ(kLen2, write_callback_.WaitForResult());
1252 } 1252 }
1253 1253
1254 } // namespace 1254 } // namespace
1255 1255
1256 } // namespace net 1256 } // namespace net
OLDNEW
« no previous file with comments | « build/secondary/testing/gtest/BUILD.gn ('k') | testing/gtest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698