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

Unified Diff: tests/html/canvas_test.dart

Issue 10544167: Some unit test fixes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « tests/html/canvas_pixel_array_type_alias_test.dart ('k') | tests/html/canvas_using_html_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/canvas_test.dart
===================================================================
--- tests/html/canvas_test.dart (revision 8732)
+++ tests/html/canvas_test.dart (working copy)
@@ -62,12 +62,12 @@
canvas.height);
Uint8ClampedArray data = image.data;
- Expect.equals(40000, data.length);
+ expect(data, hasLength(40000));
checkPixel(data, 0, [0, 0, 0, 0]);
checkPixel(data, width * height - 1, [0, 0, 0, 0]);
data[100] = 200;
- Expect.equals(200, data[100]);
+ expect(data[100], equals(200));
});
test('PutImageData', () {
ImageData data = context.getImageData(0, 0, width, height);
@@ -76,8 +76,8 @@
context.putImageData(data, 0, 0);
data = context.getImageData(0, 0, width, height);
- Expect.equals(25, data.data[0]);
- Expect.equals(255, data.data[3]);
+ expect(data.data[0], equals(25));
+ expect(data.data[3], equals(255));
});
}
@@ -85,6 +85,6 @@
{
offset *= 4;
for (var i = 0; i < 4; ++i) {
- Expect.equals(rgba[i], data[offset + i]);
+ expect(data[offset + i], equals(rgba[i]));
}
}
« no previous file with comments | « tests/html/canvas_pixel_array_type_alias_test.dart ('k') | tests/html/canvas_using_html_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698