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

Unified Diff: frog/leg/lib/core.dart

Issue 9027003: Add support for Expect.equals in the Leg core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « no previous file | frog/tests/leg_only/src/LoopIfPhiTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/lib/core.dart
diff --git a/frog/leg/lib/core.dart b/frog/leg/lib/core.dart
index 5712d6b25c3ffd21167766411f512cbcec13c7f2..47cb7bf922858fedba9d810a95c9d0406c9da382 100644
--- a/frog/leg/lib/core.dart
+++ b/frog/leg/lib/core.dart
@@ -249,6 +249,15 @@ class bool {}
class Object {}
class List<T> {}
+class Expect {
+ static void equals(var expected, var actual) {
+ if (expected == actual) return;
+ print('Expect.equals(expected: <' + expected.toString() +
+ '>, actual:<' + actual.toString() + '> fails.');
+ throw 'Expect.equals failed.';
+ }
+}
+
class Stopwatch {
double startMs;
double elapsedMs;
« no previous file with comments | « no previous file | frog/tests/leg_only/src/LoopIfPhiTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698