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); |
}); |
} |