| OLD | NEW |
| 1 var BenchmarkBase; | 1 var BenchmarkBase; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 class Expect extends core.Object { | 4 class Expect extends core.Object { |
| 5 static equals(expected, actual) { | 5 static equals(expected, actual) { |
| 6 if (!dart.equals(expected, actual)) { | 6 if (!dart.equals(expected, actual)) { |
| 7 throw `Values not equal: ${expected} vs ${actual}`; | 7 throw `Values not equal: ${expected} vs ${actual}`; |
| 8 } | 8 } |
| 9 } | 9 } |
| 10 static listEquals(expected, actual) { | 10 static listEquals(expected, actual) { |
| 11 if (expected.length !== actual.length) { | 11 if (expected.length != actual.length) { |
| 12 throw `Lists have different lengths: ${expected.length} vs ${actual.leng
th}`; | 12 throw `Lists have different lengths: ${expected.length} vs ${actual.leng
th}`; |
| 13 } | 13 } |
| 14 for (let i = 0; dart.notNull(i) < dart.notNull(actual.length); i = dart.no
tNull(i) + 1) { | 14 for (let i = 0; dart.notNull(i) < dart.notNull(actual.length); i = dart.no
tNull(i) + 1) { |
| 15 Expect.equals(expected.get(i), actual.get(i)); | 15 Expect.equals(expected.get(i), actual.get(i)); |
| 16 } | 16 } |
| 17 } | 17 } |
| 18 fail(message) { | 18 fail(message) { |
| 19 throw message; | 19 throw message; |
| 20 } | 20 } |
| 21 } | 21 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 report() { | 61 report() { |
| 62 let score = this.measure(); | 62 let score = this.measure(); |
| 63 core.print(`${this.name}(RunTime): ${score} us.`); | 63 core.print(`${this.name}(RunTime): ${score} us.`); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 // Exports: | 66 // Exports: |
| 67 exports.Expect = Expect; | 67 exports.Expect = Expect; |
| 68 exports.BenchmarkBase = BenchmarkBase; | 68 exports.BenchmarkBase = BenchmarkBase; |
| 69 })(BenchmarkBase || (BenchmarkBase = {})); | 69 })(BenchmarkBase || (BenchmarkBase = {})); |
| OLD | NEW |