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

Unified Diff: pkg/smoke/lib/src/common.dart

Issue 370493002: Fix utility function in smoke, add tests for it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | pkg/smoke/test/common_utils_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/lib/src/common.dart
diff --git a/pkg/smoke/lib/src/common.dart b/pkg/smoke/lib/src/common.dart
index 1d73e4ff836ceb04cd921ac62177cbc9305d8311..24ed4fd95ac38de14606ffdd82bdcc2504fb342d 100644
--- a/pkg/smoke/lib/src/common.dart
+++ b/pkg/smoke/lib/src/common.dart
@@ -88,6 +88,11 @@ bool compareLists(List a, List b, {bool unordered: false}) {
for (int i = 0; i < a.length; i++) {
if (!bSet.contains(a[i])) return false;
}
+
+ var aSet = new Set()..addAll(a);
+ for (int i = 0; i < b.length; i++) {
+ if (!aSet.contains(b[i])) return false;
+ }
vicb 2014/07/13 09:55:02 I think that the code is still not right. [1 1 2
justinfagnani 2014/07/14 17:20:19 A Set is not going to work here, you need two maps
Siggi Cherem (dart-lang) 2014/07/14 19:48:57 <facepalm> ... Ok I updated this again, hopefully
} else {
for (int i = 0; i < a.length; i++) {
if (a[i] != b[i]) return false;
« no previous file with comments | « no previous file | pkg/smoke/test/common_utils_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698