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

Unified Diff: test/codegen/expect/BenchmarkBase.js

Issue 1178523004: fixes #215, removes special case for length (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
Index: test/codegen/expect/BenchmarkBase.js
diff --git a/test/codegen/expect/BenchmarkBase.js b/test/codegen/expect/BenchmarkBase.js
index a395c7829f0364fe0f71cef608406736a08aeb2a..970537789042529643a1ac0f08de8161136a0151 100644
--- a/test/codegen/expect/BenchmarkBase.js
+++ b/test/codegen/expect/BenchmarkBase.js
@@ -10,10 +10,10 @@ dart.library('BenchmarkBase', null, /* Imports */[
}
}
static listEquals(expected, actual) {
- if (expected.length != actual.length) {
- throw `Lists have different lengths: ${expected.length} vs ${actual.length}`;
+ if (expected[dartx.length] != actual[dartx.length]) {
+ throw `Lists have different lengths: ${expected[dartx.length]} vs ${actual[dartx.length]}`;
}
- for (let i = 0; dart.notNull(i) < dart.notNull(actual.length); i = dart.notNull(i) + 1) {
+ for (let i = 0; dart.notNull(i) < dart.notNull(actual[dartx.length]); i = dart.notNull(i) + 1) {
Expect.equals(expected[dartx.get](i), actual[dartx.get](i));
}
}

Powered by Google App Engine
This is Rietveld 408576698