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

Unified Diff: tests/FunctionTest.cpp

Issue 1055633003: That last CL subverted the purpose of the test. Put it back how it was. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/FunctionTest.cpp
diff --git a/tests/FunctionTest.cpp b/tests/FunctionTest.cpp
index 01ba5885a898457ba3989e780bc6323a0c927194..0feef7c04c00cd54e3a81c0bd903ff754e97ce5d 100644
--- a/tests/FunctionTest.cpp
+++ b/tests/FunctionTest.cpp
@@ -44,7 +44,8 @@ DEF_TEST(Function, r) {
test_add_five(r, MoveOnlyAdd5());
// Makes sure we forward arguments when calling SkFunction.
- REPORTER_ASSERT(r, [](int x, MoveOnlyAdd5&& f, int y) {
- return x * f(y);
- }(2, MoveOnlyAdd5(), 4) == 18);
+ SkFunction<int(int, MoveOnlyAdd5&&, int)> f([](int x, MoveOnlyAdd5&& addFive, int y) {
+ return x * addFive(y);
+ });
+ REPORTER_ASSERT(r, f(2, MoveOnlyAdd5(), 4) == 18);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698