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

Side by Side Diff: tests/standalone/full_coverage_test.dart

Issue 899243002: Make standalone tests not dependent on current working directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove stray blank line Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/standalone/io/arguments_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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';
11 import 'dart:io'; 11 import 'dart:io';
12 12
13 import 'package:path/path.dart' as path; 13 import 'package:path/path.dart' as path;
14 import 'package:unittest/unittest.dart'; 14 import 'package:unittest/unittest.dart';
15 15
16 final String coverageScript = "tools/full-coverage.dart"; 16 final String coverageScript =
17 Platform.script.resolve('../../tools/full-coverage.dart').toFilePath();
17 final String packageRoot = Platform.packageRoot; 18 final String packageRoot = Platform.packageRoot;
18 final List dartBaseArgs = ['--package-root=${packageRoot}', '--checked',]; 19 final List dartBaseArgs = ['--package-root=${packageRoot}', '--checked',];
19 20
20 // With line numbers starting at 0, the list of hits can be understood as 21 // With line numbers starting at 0, the list of hits can be understood as
21 // follows: 22 // follows:
22 // * -1: No coverage data on this line. 23 // * -1: No coverage data on this line.
23 // * 0: No hits on this line. 24 // * 0: No hits on this line.
24 // * 1: ``Some'' hits on this line. 25 // * 1: ``Some'' hits on this line.
25 final coverageTests = [ 26 final coverageTests = [
26 { 27 {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 String programPath = path.join(programDir, "${cTest['name']}.dart"); 223 String programPath = path.join(programDir, "${cTest['name']}.dart");
223 testCoverage(programDir, programPath, 224 testCoverage(programDir, programPath,
224 new LcovDescriptor(programPath), 225 new LcovDescriptor(programPath),
225 new List.from(cTest['expectedHits'])); 226 new List.from(cTest['expectedHits']));
226 testCoverage(programDir, programPath, 227 testCoverage(programDir, programPath,
227 new PrettyPrintDescriptor(programPath), 228 new PrettyPrintDescriptor(programPath),
228 new List.from(cTest['expectedHits'])); 229 new List.from(cTest['expectedHits']));
229 }); 230 });
230 }); 231 });
231 } 232 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/io/arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698