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

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

Issue 1311223006: Fix full_coverage_test.dart. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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';
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 main() { 44 main() {
45 if (false) { 45 if (false) {
46 dummy(11); 46 dummy(11);
47 } else { 47 } else {
48 fac(10); 48 fac(10);
49 } 49 }
50 } 50 }
51 ''', 51 ''',
52 'expectedHits': [-1, 0, 0, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 52 'expectedHits': [-1, 0, 0, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1,
53 0, -1, 1, -1, -1] 53 -1, 0, -1, 1, -1, -1]
54 },{ 54 },{
55 'name': 'closures', 55 'name': 'closures',
56 'program': ''' 56 'program': '''
57 main() { 57 main() {
58 foo(bar) { 58 foo(bar) {
59 bar(); 59 bar();
60 } 60 }
61 61
62 foo(() { 62 foo(() {
63 print("in closure"); 63 print("in closure");
64 }); 64 });
65 } 65 }
66 ''', 66 ''',
67 'expectedHits': [1, -1, 1, -1, -1, 1, 1, -1, -1] 67 'expectedHits': [-1, -1, 1, -1, -1, 1, 1, -1, -1]
68 } 68 }
69 ]; 69 ];
70 70
71 71
72 String prepareEnv() { 72 String prepareEnv() {
73 Directory testDir = Directory.systemTemp.createTempSync("coverage-"); 73 Directory testDir = Directory.systemTemp.createTempSync("coverage-");
74 for (var coverageProg in coverageTests) { 74 for (var coverageProg in coverageTests) {
75 var coverageProgDir = new Directory( 75 var coverageProgDir = new Directory(
76 path.join(testDir.path, coverageProg["name"])) 76 path.join(testDir.path, coverageProg["name"]))
77 ..createSync(); 77 ..createSync();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 String programPath = path.join(programDir, "${cTest['name']}.dart"); 227 String programPath = path.join(programDir, "${cTest['name']}.dart");
228 testCoverage(programDir, programPath, 228 testCoverage(programDir, programPath,
229 new LcovDescriptor(programPath), 229 new LcovDescriptor(programPath),
230 new List.from(cTest['expectedHits'])); 230 new List.from(cTest['expectedHits']));
231 testCoverage(programDir, programPath, 231 testCoverage(programDir, programPath,
232 new PrettyPrintDescriptor(programPath), 232 new PrettyPrintDescriptor(programPath),
233 new List.from(cTest['expectedHits'])); 233 new List.from(cTest['expectedHits']));
234 }); 234 });
235 }); 235 });
236 } 236 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698