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

Side by Side Diff: test/frontend/expect_async_test.dart

Issue 1172213002: Improve the capture and display of syntax errors in VM tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 6 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 | « lib/src/runner/vm/isolate_listener.dart ('k') | test/runner/runner_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) 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:test/src/backend/state.dart'; 7 import 'package:test/src/backend/state.dart';
8 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
9 9
10 import '../utils.dart'; 10 import '../utils.dart';
11 11
12 void main() { 12 void main() {
13 group("supports a function with this many arguments:", () { 13 group("supports a function with this many arguments:", ()
kevmoo 2015/06/10 14:24:10 Oops?
nweiz 2015/06/10 21:22:01 Done.
14 test("0", () async { 14 test("0", () async {
15 var callbackRun = false; 15 var callbackRun = false;
16 var liveTest = await runTestBody(() { 16 var liveTest = await runTestBody(() {
17 expectAsync(() { 17 expectAsync(() {
18 callbackRun = true; 18 callbackRun = true;
19 })(); 19 })();
20 }); 20 });
21 21
22 expectTestPassed(liveTest); 22 expectTestPassed(liveTest);
23 expect(callbackRun, isTrue); 23 expect(callbackRun, isTrue);
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 caughtError = true; 323 caughtError = true;
324 } 324 }
325 }); 325 });
326 326
327 expectTestFailed(liveTest, 'oh no'); 327 expectTestFailed(liveTest, 'oh no');
328 expect(returnValue, isNull); 328 expect(returnValue, isNull);
329 expect(caughtError, isFalse); 329 expect(caughtError, isFalse);
330 }); 330 });
331 }); 331 });
332 } 332 }
OLDNEW
« no previous file with comments | « lib/src/runner/vm/isolate_listener.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698