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

Unified Diff: sky/tests/resources/display_list.dart

Issue 1185423003: Add a Paint::toString() method to describe our Paint objects. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: abarth Created 5 years, 6 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 | « sky/tests/raw/sector_layout-expected.txt ('k') | sky/tests/widgets/buttons-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/resources/display_list.dart
diff --git a/sky/tests/resources/display_list.dart b/sky/tests/resources/display_list.dart
index d831d0412ad736fa2449aed4cca75c3a8b24466e..a83f34d0aa9878ed6cdda5111169934f4510891c 100644
--- a/sky/tests/resources/display_list.dart
+++ b/sky/tests/resources/display_list.dart
@@ -26,17 +26,12 @@ class TestDisplayList extends RenderObjectDisplayList {
logger("${indent} ${s}");
}
- String explainPaint(Paint paint) {
- assert(paint.toString() == "Instance of 'Paint'"); // if this assertion fails, remove all calls to explainPaint with just inlining $paint
- return "Paint(${paint.color})";
- }
-
void save() {
log("save");
}
void saveLayer(Rect bounds, Paint paint) {
- log("saveLayer($bounds, ${explainPaint(paint)})");
+ log("saveLayer($bounds, $paint)");
}
void restore() {
@@ -76,7 +71,7 @@ class TestDisplayList extends RenderObjectDisplayList {
}
void drawLine(double x0, double y0, double x1, double y1, Paint paint) {
- log("drawLine($x0, $y0, $x1, $y1, ${explainPaint(paint)})");
+ log("drawLine($x0, $y0, $x1, $y1, $paint)");
}
void drawPicture(sky.Picture picture) {
@@ -84,31 +79,31 @@ class TestDisplayList extends RenderObjectDisplayList {
}
void drawPaint(Paint paint) {
- log("drawPaint(${explainPaint(paint)})");
+ log("drawPaint($paint)");
}
void drawRect(Rect rect, Paint paint) {
- log("drawRect($rect, ${explainPaint(paint)})");
+ log("drawRect($rect, $paint)");
}
void drawRRect(sky.RRect rrect, Paint paint) {
- log("drawRRect($rrect, ${explainPaint(paint)})");
+ log("drawRRect($rrect, $paint)");
}
void drawOval(Rect rect, Paint paint) {
- log("drawOval($rect, ${explainPaint(paint)})");
+ log("drawOval($rect, $paint)");
}
void drawCircle(double x, double y, double radius, Paint paint) {
- log("drawCircle($x, $y, $radius, ${explainPaint(paint)})");
+ log("drawCircle($x, $y, $radius, $paint)");
}
void drawPath(Path path, Paint paint) {
- log("drawPath($path, ${explainPaint(paint)})");
+ log("drawPath($path, $paint)");
}
void drawImage(sky.Image image, double x, double y, Paint paint) {
- log("drawImage($image, $x, $y, ${explainPaint(paint)})");
+ log("drawImage($image, $x, $y, $paint)");
}
void paintChild(RenderObject child, Point position) {
« no previous file with comments | « sky/tests/raw/sector_layout-expected.txt ('k') | sky/tests/widgets/buttons-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698