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

Unified Diff: third_party/WebKit/Source/wtf/FunctionalTest.cpp

Issue 2386843002: reflow comments in wtf (Closed)
Patch Set: comments (heh!) Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/wtf/Functional.h ('k') | third_party/WebKit/Source/wtf/HashFunctions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/FunctionalTest.cpp
diff --git a/third_party/WebKit/Source/wtf/FunctionalTest.cpp b/third_party/WebKit/Source/wtf/FunctionalTest.cpp
index 0a03c543c39e203d7139994d970841cfe1de5c60..8157975c4aff68e484a2331f7e4d2dc6f750764e 100644
--- a/third_party/WebKit/Source/wtf/FunctionalTest.cpp
+++ b/third_party/WebKit/Source/wtf/FunctionalTest.cpp
@@ -478,9 +478,8 @@ TEST(FunctionalTest, BindMoveOnlyObjects) {
bind(singleMoveOnlyByRvalueReference, passed(std::move(one)));
EXPECT_EQ(0, one.value()); // Should be moved away.
EXPECT_EQ(1, (*bound)());
- EXPECT_EQ(
- 0,
- (*bound)()); // The stored value must be cleared in the first function call.
+ // The stored value must be cleared in the first function call.
+ EXPECT_EQ(0, (*bound)());
bound = bind(singleMoveOnlyByValue, passed(MoveOnly(1)));
EXPECT_EQ(1, (*bound)());
@@ -530,9 +529,8 @@ TEST(FunctionalTest, CountCopiesOfBoundArguments) {
EXPECT_EQ(2, (*bound)());
bound = bind(takeCountCopyAsValue, lvalue);
- EXPECT_EQ(
- 3,
- (*bound)()); // wrapping, unwrapping and copying in the final function argument.
+ // wrapping, unwrapping and copying in the final function argument.
+ EXPECT_EQ(3, (*bound)());
bound = bind(takeCountCopyAsValue, CountCopy());
EXPECT_EQ(3, (*bound)());
@@ -566,13 +564,11 @@ TEST(FunctionalTest, CountCopiesOfUnboundArguments) {
EXPECT_EQ(0, (*bound1)(CountCopy()));
std::unique_ptr<Function<int(CountCopy)>> bound2 = bind(takeCountCopyAsValue);
- EXPECT_EQ(
- 3,
- (*bound2)(
- lvalue)); // At Function::operator(), at Callback::Run() and at the destination function.
- EXPECT_LE(
- (*bound2)(CountCopy()),
- 2); // Compiler is allowed to optimize one copy away if the argument is rvalue.
+ // At Function::operator(), at Callback::Run() and at the destination
+ // function.
+ EXPECT_EQ(3, (*bound2)(lvalue));
+ // Compiler is allowed to optimize one copy away if the argument is rvalue.
+ EXPECT_LE((*bound2)(CountCopy()), 2);
}
TEST(FunctionalTest, WeakPtr) {
« no previous file with comments | « third_party/WebKit/Source/wtf/Functional.h ('k') | third_party/WebKit/Source/wtf/HashFunctions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698