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

Unified Diff: tests/standalone/io/test_extension_tester.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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 | « tests/standalone/io/test_extension_test.dart ('k') | tests/standalone/io/url_encoding_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/test_extension_tester.dart
diff --git a/tests/standalone/io/test_extension_tester.dart b/tests/standalone/io/test_extension_tester.dart
index deacbaa5bbfdeb0f28688abf2fef899f61b2cf83..707771795f217aba8ffab1b0626e003addadd392 100644
--- a/tests/standalone/io/test_extension_tester.dart
+++ b/tests/standalone/io/test_extension_tester.dart
@@ -6,6 +6,22 @@ library test_extension_test;
import "test_extension.dart";
+class Expect {
+ static void equals(expected, actual, [msg]) {
+ if (expected != actual) {
+ if (msg == null) msg = "Expected: $expected. Actual: $actual";
+ throw new RuntimeError(msg);
+ }
+ }
+
+ static void isNull(x, [msg]) {
+ if (x != null) {
+ if (msg != null) msg = "$x not null";
+ throw new RuntimeError(msg);
+ }
+ }
+}
+
main() {
Expect.equals('cat 13', new Cat(13).toString(), 'new Cat(13).toString()');
« no previous file with comments | « tests/standalone/io/test_extension_test.dart ('k') | tests/standalone/io/url_encoding_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698