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

Unified Diff: tests/html/svg_1_test.dart

Issue 11275054: Modified unittest to use new argument syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
Index: tests/html/svg_1_test.dart
===================================================================
--- tests/html/svg_1_test.dart (revision 14156)
+++ tests/html/svg_1_test.dart (working copy)
@@ -8,6 +8,8 @@
main() {
useHtmlConfiguration();
+ var isSVGElement = predicate((x) => x is SVGElement, 'is a SVGElement');
+
test('simpleRect', () {
var div = new Element.tag('div');
document.body.nodes.add(div);
@@ -19,14 +21,14 @@
''';
var e = document.query('#svg1');
- Expect.isTrue(e != null);
+ expect(e, isNotNull);
SVGRectElement r = document.query('#rect1');
- Expect.equals(10, r.x.baseVal.value);
- Expect.equals(20, r.y.baseVal.value);
- Expect.equals(40, r.height.baseVal.value);
- Expect.equals(130, r.width.baseVal.value);
- Expect.equals(5, r.rx.baseVal.value);
+ expect(r.x.baseVal.value, 10);
+ expect(r.y.baseVal.value, 20);
+ expect(r.height.baseVal.value, 40);
+ expect(r.width.baseVal.value, 130);
+ expect(r.rx.baseVal.value, 5);
});
test('trailing newline', () {
@@ -37,7 +39,7 @@
</svg>
""");
- expect(logo is SVGElement, true);
+ expect(logo, isSVGElement);
});
}

Powered by Google App Engine
This is Rietveld 408576698