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

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

Issue 12210100: If two Maps are compared with an equals() matcher and they have the same length, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
Index: pkg/unittest/test/matchers_test.dart
===================================================================
--- pkg/unittest/test/matchers_test.dart (revision 18269)
+++ pkg/unittest/test/matchers_test.dart (working copy)
@@ -521,6 +521,18 @@
shouldFail(a, isEmpty, "Expected: empty but: was <{foo: bar}>.");
});
+ test('equals', () {
+ var a = new Map();
+ a['foo'] = 'bar';
+ var b = new Map();
+ b['foo'] = 'bar';
+ var c = new Map();
+ c['bar'] = 'foo';
+ shouldPass(a, equals(b));
+ shouldFail(b, equals(c),
+ "Expected: <{bar: foo}> but: missing map key bar 'bar'.");
+ });
+
test('contains', () {
var a = new Map();
a['foo'] = 'bar';
« pkg/unittest/lib/src/core_matchers.dart ('K') | « pkg/unittest/lib/src/core_matchers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698