Index: tests/html/htmlaudioelement_test.dart |
=================================================================== |
--- tests/html/htmlaudioelement_test.dart (revision 14156) |
+++ tests/html/htmlaudioelement_test.dart (working copy) |
@@ -7,16 +7,19 @@ |
useHtmlConfiguration(); |
+ var isAudioElement = |
+ predicate((x) => x is AudioElement, 'is an AudioElement'); |
+ |
test('constructorTest1', () { |
var audio = new AudioElement(); // would be new Audio() in JS |
- Expect.isTrue(audio != null); |
- Expect.isTrue(audio is AudioElement); |
+ expect(audio, isNotNull); |
+ expect(audio, isAudioElement); |
}); |
test('constructorTest2', () { |
var audio = new AudioElement('hahaURL'); |
- Expect.isTrue(audio != null); |
- Expect.isTrue(audio is AudioElement); |
- Expect.isTrue(audio.src.indexOf('hahaURL') >= 0); |
+ expect(audio, isNotNull); |
+ expect(audio, isAudioElement); |
+ expect(audio.src.indexOf('hahaURL'), greaterThanOrEqualTo(0)); |
}); |
} |