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

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

Issue 12827018: Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Prefer local variable. Created 7 years, 9 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 | « no previous file | runtime/lib/collection_patch.dart » ('j') | runtime/lib/collection_patch.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/matchers_test.dart
diff --git a/pkg/unittest/test/matchers_test.dart b/pkg/unittest/test/matchers_test.dart
index b11f7a6dca180aedca1149189b4c381c894b2a5e..f49e0cb553fdfaf9ff347fee1db39485df42e2ff 100644
--- a/pkg/unittest/test/matchers_test.dart
+++ b/pkg/unittest/test/matchers_test.dart
@@ -5,6 +5,7 @@
library unittestTests;
import 'package:unittest/unittest.dart';
import 'dart:async';
+import 'dart:collection';
part 'test_utils.dart';
doesNotThrow() {}
@@ -542,16 +543,16 @@ void main() {
});
test('equals with different lengths', () {
- var a = new Map();
+ var a = new LinkedHashMap();
a['foo'] = 'bar';
- var b = new Map();
+ var b = new LinkedHashMap();
b['foo'] = 'bar';
b['bar'] = 'foo';
- var c = new Map();
+ var c = new LinkedHashMap();
c['bar'] = 'foo';
c['barrista'] = 'caffeine';
shouldFail(a, equals(b),
- "Expected: <{bar: foo, foo: bar}> "
+ "Expected: <{foo: bar, bar: foo}> "
"but: different map lengths; missing map key 'bar'.");
shouldFail(b, equals(a),
"Expected: <{foo: bar}> "
@@ -560,7 +561,7 @@ void main() {
"Expected: <{bar: foo, barrista: caffeine}> "
"but: missing map key 'barrista'.");
shouldFail(c, equals(b),
- "Expected: <{bar: foo, foo: bar}> "
+ "Expected: <{foo: bar, bar: foo}> "
"but: missing map key 'foo'.");
shouldFail(a, equals(c),
"Expected: <{bar: foo, barrista: caffeine}> "
« no previous file with comments | « no previous file | runtime/lib/collection_patch.dart » ('j') | runtime/lib/collection_patch.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698