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

Unified Diff: tests/html/window_nosuchmethod_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/window_nosuchmethod_test.dart
===================================================================
--- tests/html/window_nosuchmethod_test.dart (revision 14156)
+++ tests/html/window_nosuchmethod_test.dart (working copy)
@@ -25,18 +25,18 @@
final message = foo("Hello World");
try {
String x = win.foo(message);
- Expect.fail('Should not reach here: $x');
+ expect(false, isTrue, reason: 'Should not reach here: $x');
} on NoSuchMethodError catch (e) {
// Expected exception.
} on Exception catch (e) {
- Expect.fail('Wrong exception: $e');
+ expect(false, isTrue, reason: 'Wrong exception: $e');
}
});
test('foo', () {
var win = things[inscrutable(0)];
String x = win.foo('bar');
- Expect.equals('not bar', x);
+ expect(x, 'not bar');
});
// Use dom.window direclty in case the compiler does type inference.
@@ -44,11 +44,11 @@
final message = foo("Hello World");
try {
String x = dom.window.foo(message);
- Expect.fail('Should not reach here: $x');
+ expect(false, isTrue, reason: 'Should not reach here: $x');
} on NoSuchMethodError catch (e) {
// Expected exception.
} on Exception catch (e) {
- Expect.fail('Wrong exception: $e');
+ expect(false, isTrue, reason: 'Wrong exception: $e');
}
});
}

Powered by Google App Engine
This is Rietveld 408576698