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

Unified Diff: tests/html/document_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/document_test.dart
===================================================================
--- tests/html/document_test.dart (revision 14156)
+++ tests/html/document_test.dart (working copy)
@@ -6,11 +6,17 @@
main() {
useHtmlConfiguration();
+ var isElement = predicate((x) => x is Element, 'is an Element');
+ var isDivElement = predicate((x) => x is DivElement, 'is a DivElement');
+ var isAnchorElement =
+ predicate((x) => x is AnchorElement, 'is an AnchorElement');
+ var isUnknownElement = predicate((x) => x is Element, 'is UnknownElement');
+
test('CreateElement', () {
// FIXME: nifty way crashes, do it boring way.
- Expect.isTrue(new Element.tag('span') is Element);
- Expect.isTrue(new Element.tag('div') is DivElement);
- Expect.isTrue(new Element.tag('a') is AnchorElement);
- Expect.isTrue(new Element.tag('bad_name') is UnknownElement);
+ expect(new Element.tag('span'), isElement);
+ expect(new Element.tag('div'), isDivElement);
+ expect(new Element.tag('a'), isAnchorElement);
+ expect(new Element.tag('bad_name'), isUnknownElement);
});
}

Powered by Google App Engine
This is Rietveld 408576698