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

Issue 2265453003: Add platform/transforms pretty printers for logging and testing (Closed)

Created:
4 years, 4 months ago by pdr.
Modified:
4 years, 4 months ago
Reviewers:
chrishtr, jbroman, wkorman
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add platform/transforms pretty printers for logging and testing This patch switches from a test-only TransformPrinters to a common pretty printer format for logging and testing in debug and release. For example, to print the value of an AffineTransform: AffineTransform transform = AffineTransform::translation(3, 4); LOG(INFO) << "transform: " << translation.toString(); Which prints: transform: "translation(3,4)" In tests, gtests will automatically call the PrintTo functions. For example: AffineTransform translation = AffineTransform::translation(7, 9); AffineTransform rotation; rotation.rotate(180); EXPECT_EQ(translation, rotation); Will fail with: Actual: "translation(0,0), scale(1,1), angle(3.14159rad), remainder(1,0,0,1)" Expected: "translation(7,9)" [ FAILED ] AffineTransformTest.NotEqual (0 ms) In debuggers, toString() should work as expected. There is also an optional argument to print the transforms in row-major order. BUG=632096 Committed: https://crrev.com/54bd1a11aa538122321db5481881cf8603e9bf2e Cr-Commit-Position: refs/heads/master@{#413504}

Patch Set 1 #

Patch Set 2 : Minor formatting cleanup #

Patch Set 3 : Minor cleanup #

Patch Set 4 : Remove unused code #

Total comments: 7

Patch Set 5 : Update per reviewer comments #

Messages

Total messages: 25 (18 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2265453003/60001
4 years, 4 months ago (2016-08-21 16:08:44 UTC) #15
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 4 months ago (2016-08-21 16:08:46 UTC) #17
jbroman
lgtm with nits https://codereview.chromium.org/2265453003/diff/60001/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp File third_party/WebKit/Source/platform/transforms/AffineTransform.cpp (right): https://codereview.chromium.org/2265453003/diff/60001/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp#newcode427 third_party/WebKit/Source/platform/transforms/AffineTransform.cpp:427: decomposition.angle, super-nit: up to you, but ...
4 years, 4 months ago (2016-08-21 16:21:07 UTC) #18
pdr.
Thanks! https://codereview.chromium.org/2265453003/diff/60001/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp File third_party/WebKit/Source/platform/transforms/AffineTransform.cpp (right): https://codereview.chromium.org/2265453003/diff/60001/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp#newcode427 third_party/WebKit/Source/platform/transforms/AffineTransform.cpp:427: decomposition.angle, On 2016/08/21 at 16:21:07, jbroman wrote: > ...
4 years, 4 months ago (2016-08-22 17:27:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2265453003/80001
4 years, 4 months ago (2016-08-22 17:28:43 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-22 19:27:38 UTC) #23
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 19:30:38 UTC) #25
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/54bd1a11aa538122321db5481881cf8603e9bf2e
Cr-Commit-Position: refs/heads/master@{#413504}

Powered by Google App Engine
This is Rietveld 408576698