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

Unified Diff: pkg/unittest/test/unittest_test.dart

Issue 12328143: pkg/unittest: Moved `fail` to matcher library (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes to align with r19166 Created 7 years, 10 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
« no previous file with comments | « pkg/unittest/lib/unittest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/unittest_test.dart
diff --git a/pkg/unittest/test/unittest_test.dart b/pkg/unittest/test/unittest_test.dart
index 6af85b8e5aa17815cde8d10707a59b47528e3aae..42d002e1733760b148ea8cea201756852775f27a 100644
--- a/pkg/unittest/test/unittest_test.dart
+++ b/pkg/unittest/test/unittest_test.dart
@@ -132,8 +132,8 @@ runTest() {
test('testOne', () {
var f = expectAsync0(() {});
_defer(protectAsync0(() {
- _defer(protectAsync0(() => expect(false, isTrue)));
- expect(false, isTrue);
+ _defer(protectAsync0(() => fail('first failure')));
+ fail('second failure');
}));
});
test('testTwo', () {
@@ -262,7 +262,7 @@ runTest() {
});
test("fail2", () {
return _defer(() {
- expect(false, true);
+ fail('failure');
});
});
test('foo5', () {
@@ -307,7 +307,7 @@ runTest() {
return _defer(() {
Timer.run(() {
guardAsync(() {
- expect(false, true);
+ fail('failure');
callback();
});
});
@@ -401,13 +401,13 @@ main() {
'error1:Callback called more times than expected (3 > 1).:'
'fail1:Expected: <false> but: was <true>.:'
'error2:Callback called more times than expected (2 > 1).:'
- 'fail2:Expected: <true> but: was <false>.:'
+ 'fail2:failure:'
'foo5'),
buildStatusString(2, 2, 2,
'successful::'
'fail1:Expected: <false> but: was <true>.:'
'error1:Callback called more times than expected (3 > 1).:'
- 'fail2:Expected: <true> but: was <false>.:'
+ 'fail2:failure:'
'error2:Callback called more times than expected (2 > 1).:'
'foo6'),
];
« no previous file with comments | « pkg/unittest/lib/unittest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698