| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // These tests fork a second VM process that runs the script | 5 // These tests fork a second VM process that runs the script |
| 6 // ``tools/full-coverage.dart'' and verifies that the tool | 6 // ``tools/full-coverage.dart'' and verifies that the tool |
| 7 // produces the expeced output. | 7 // produces the expeced output. |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:convert'; | 10 import 'dart:convert'; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 main() { | 213 main() { |
| 214 String testingDirectory; | 214 String testingDirectory; |
| 215 | 215 |
| 216 setUp(() { | 216 setUp(() { |
| 217 testingDirectory = prepareEnv(); | 217 testingDirectory = prepareEnv(); |
| 218 }); | 218 }); |
| 219 | 219 |
| 220 tearDown(() => destroyEnv(testingDirectory)); | 220 tearDown(() => destroyEnv(testingDirectory)); |
| 221 | 221 |
| 222 test('CoverageTests', () { | 222 test('CoverageTests', () { |
| 223 print('Generating coverage data...'); |
| 223 generateCoverage(testingDirectory); | 224 generateCoverage(testingDirectory); |
| 225 print('Done Generating coverage data.'); |
| 224 | 226 |
| 227 print('Running tests...'); |
| 225 coverageTests.forEach((cTest) { | 228 coverageTests.forEach((cTest) { |
| 226 String programDir = path.join(testingDirectory, cTest['name']); | 229 String programDir = path.join(testingDirectory, cTest['name']); |
| 227 String programPath = path.join(programDir, "${cTest['name']}.dart"); | 230 String programPath = path.join(programDir, "${cTest['name']}.dart"); |
| 228 testCoverage(programDir, programPath, | 231 testCoverage(programDir, programPath, |
| 229 new LcovDescriptor(programPath), | 232 new LcovDescriptor(programPath), |
| 230 new List.from(cTest['expectedHits'])); | 233 new List.from(cTest['expectedHits'])); |
| 231 testCoverage(programDir, programPath, | 234 testCoverage(programDir, programPath, |
| 232 new PrettyPrintDescriptor(programPath), | 235 new PrettyPrintDescriptor(programPath), |
| 233 new List.from(cTest['expectedHits'])); | 236 new List.from(cTest['expectedHits'])); |
| 234 }); | 237 }); |
| 235 }); | 238 }); |
| 236 } | 239 } |
| OLD | NEW |