| OLD | NEW |
| 1 var BenchmarkBase; | 1 var BenchmarkBase = dart.defineLibrary(BenchmarkBase, {}); |
| 2 (function(exports) { | 2 var core = dart.import(core); |
| 3 (function(exports, core) { |
| 3 'use strict'; | 4 'use strict'; |
| 4 class Expect extends core.Object { | 5 class Expect extends core.Object { |
| 5 static equals(expected, actual) { | 6 static equals(expected, actual) { |
| 6 if (!dart.equals(expected, actual)) { | 7 if (!dart.equals(expected, actual)) { |
| 7 throw `Values not equal: ${expected} vs ${actual}`; | 8 throw `Values not equal: ${expected} vs ${actual}`; |
| 8 } | 9 } |
| 9 } | 10 } |
| 10 static listEquals(expected, actual) { | 11 static listEquals(expected, actual) { |
| 11 if (expected[core.$length] != actual[core.$length]) { | 12 if (expected[core.$length] != actual[core.$length]) { |
| 12 throw `Lists have different lengths: ${expected[core.$length]} vs ${actu
al[core.$length]}`; | 13 throw `Lists have different lengths: ${expected[core.$length]} vs ${actu
al[core.$length]}`; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 return result; | 60 return result; |
| 60 } | 61 } |
| 61 report() { | 62 report() { |
| 62 let score = this.measure(); | 63 let score = this.measure(); |
| 63 core.print(`${this.name}(RunTime): ${score} us.`); | 64 core.print(`${this.name}(RunTime): ${score} us.`); |
| 64 } | 65 } |
| 65 } | 66 } |
| 66 // Exports: | 67 // Exports: |
| 67 exports.Expect = Expect; | 68 exports.Expect = Expect; |
| 68 exports.BenchmarkBase = BenchmarkBase; | 69 exports.BenchmarkBase = BenchmarkBase; |
| 69 })(BenchmarkBase || (BenchmarkBase = {})); | 70 })(BenchmarkBase, core); |
| OLD | NEW |