| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library benchmarksmoketest; | |
| 6 | |
| 7 // Tests that benchmark classes used in perf testing are not broken. | |
| 8 import 'benchmark_lib.dart'; | |
| 9 import 'dart:async'; | |
| 10 import 'dart:html'; | |
| 11 import 'package:expect/expect.dart'; | |
| 12 import 'package:unittest/unittest.dart'; | |
| 13 import 'package:unittest/html_config.dart'; | |
| 14 | |
| 15 void main() { | |
| 16 useHtmlConfiguration(); | |
| 17 | |
| 18 test('performanceTesting', () { | |
| 19 Timer.run(BENCHMARK_SUITE.runBenchmarks); | |
| 20 Timer.run(expectAsync(testForCompletion)); | |
| 21 }); | |
| 22 } | |
| 23 | |
| 24 testForCompletion() { | |
| 25 Element element = document.query('#testResultScore'); | |
| 26 RegExp re = new RegExp('Score: [0-9]+'); | |
| 27 print(element.text); | |
| 28 Expect.isTrue(re.hasMatch(element.text)); | |
| 29 } | |
| OLD | NEW |