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

Unified Diff: tests/html/svg_2_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_2_test.dart
===================================================================
--- tests/html/svg_2_test.dart (revision 14114)
+++ tests/html/svg_2_test.dart (working copy)
@@ -26,22 +26,28 @@
var r = document.query('#rect1');
// Direct inheritance chain
- Expect.isTrue(r is SVGElement);
- Expect.isTrue(r is Element);
- Expect.isTrue(r is Node);
+ expect(r, new isInstanceOf<SVGElement>('SVGElement'));
+ expect(r, new isInstanceOf<Element>('Element'));
+ expect(r, new isInstanceOf<Node>('Node'));
// Other implemented interfaces.
- Expect.isTrue(r is SVGTests);
- Expect.isTrue(r is SVGLangSpace);
- Expect.isTrue(r is SVGExternalResourcesRequired);
- Expect.isTrue(r is SVGStylable);
- Expect.isTrue(r is SVGTransformable);
- Expect.isTrue(r is SVGLocatable);
+ expect(r, new isInstanceOf<SVGTests>('SVGTests'));
+ expect(r, new isInstanceOf<SVGLangSpace>('SVGLangSpace'));
+ expect(r, new isInstanceOf<SVGExternalResourcesRequired>(
+ 'SVGExternalResourcesRequired'));
+ expect(r, new isInstanceOf<SVGStylable>('SVGStylable'));
+ expect(r, new isInstanceOf<SVGTransformable>('SVGTransformable'));
+ expect(r, new isInstanceOf<SVGLocatable>('SVGLocatable'));
// Interfaces not implemented.
- Expect.isFalse(r is SVGNumber);
- Expect.isFalse(r is SVGRect);
- Expect.isFalse(r is SVGSVGElement);
+ // TODO(gram): use this version when dart2js handles 'is' properly.
+ // expect(r, isNot(new isInstanceOf<SVGNumber>('SVGNumber')));
+ expect(r is! SVGNumber, isTrue);
+ // TODO(gram): use this version when dart2js handles 'is' properly.
+ // expect(r, isNot(new isInstanceOf<SVGRect>('SVGRect')));
+ expect(r is! SVGRect, isTrue);
+ expect(r,
+ isNot(new isInstanceOf<SVGSVGElement>('SVGSVGElement')));
div.remove();
});

Powered by Google App Engine
This is Rietveld 408576698