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

Side by Side Diff: test/runner/runner_test.dart

Issue 1093213003: Fix a test which was broken by the previous revision. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 8 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 test("an annotation's structure is invalid", () { 145 test("an annotation's structure is invalid", () {
146 var testPath = p.join(_sandbox, "test.dart"); 146 var testPath = p.join(_sandbox, "test.dart");
147 new File(testPath).writeAsStringSync("@TestOn()\nlibrary foo;"); 147 new File(testPath).writeAsStringSync("@TestOn()\nlibrary foo;");
148 var result = _runUnittest(["test.dart"]); 148 var result = _runUnittest(["test.dart"]);
149 149
150 expect(result.stdout, allOf([ 150 expect(result.stdout, allOf([
151 contains('-1: load error'), 151 contains('-1: load error'),
152 contains( 152 contains(
153 ' Failed to load "${p.relative(testPath, from: _sandbox)}":\n' 153 ' Failed to load "${p.relative(testPath, from: _sandbox)}":\n'
154 " Error on line 1, column 8: TestOn takes one argument.\n" 154 " Error on line 1, column 8: TestOn takes 1 argument.\n"
155 " @TestOn()\n" 155 " @TestOn()\n"
156 " ^^\n") 156 " ^^\n")
157 ])); 157 ]));
158 expect(result.exitCode, equals(1)); 158 expect(result.exitCode, equals(1));
159 }); 159 });
160 160
161 test("an annotation's contents are invalid", () { 161 test("an annotation's contents are invalid", () {
162 var testPath = p.join(_sandbox, "test.dart"); 162 var testPath = p.join(_sandbox, "test.dart");
163 new File(testPath).writeAsStringSync("@TestOn('zim')\nlibrary foo;"); 163 new File(testPath).writeAsStringSync("@TestOn('zim')\nlibrary foo;");
164 var result = _runUnittest(["test.dart"]); 164 var result = _runUnittest(["test.dart"]);
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 }); 488 });
489 }); 489 });
490 }); 490 });
491 } 491 }
492 492
493 ProcessResult _runUnittest(List<String> args) => 493 ProcessResult _runUnittest(List<String> args) =>
494 runUnittest(args, workingDirectory: _sandbox); 494 runUnittest(args, workingDirectory: _sandbox);
495 495
496 ProcessResult _runDart(List<String> args) => 496 ProcessResult _runDart(List<String> args) =>
497 runDart(args, workingDirectory: _sandbox); 497 runDart(args, workingDirectory: _sandbox);
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