OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 | 9 |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 })).create(); | 85 })).create(); |
86 | 86 |
87 d.file("test.dart", """ | 87 d.file("test.dart", """ |
88 import 'package:test/test.dart'; | 88 import 'package:test/test.dart'; |
89 | 89 |
90 void main() { | 90 void main() { |
91 test("failure", () => throw "oh no"); | 91 test("failure", () => throw "oh no"); |
92 } | 92 } |
93 """).create(); | 93 """).create(); |
94 | 94 |
95 var test = runTest(["test.dart"], reporter: "compact"); | 95 var test = runTest(["test.dart"]); |
96 test.stdout.expect(consumeThrough(contains("dart:isolate-patch"))); | 96 test.stdout.expect(consumeThrough(contains("dart:isolate-patch"))); |
97 test.shouldExit(1); | 97 test.shouldExit(1); |
98 }); | 98 }); |
99 | 99 |
100 test("doesn't dartify stack traces for JS-compiled tests with js_trace: true", | 100 test("doesn't dartify stack traces for JS-compiled tests with js_trace: true", |
101 () { | 101 () { |
102 d.file("dart_test.yaml", JSON.encode({ | 102 d.file("dart_test.yaml", JSON.encode({ |
103 "js_trace": true | 103 "js_trace": true |
104 })).create(); | 104 })).create(); |
105 | 105 |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 test("failure", () => throw "oh no"); | 535 test("failure", () => throw "oh no"); |
536 } | 536 } |
537 """) | 537 """) |
538 ]).create(); | 538 ]).create(); |
539 | 539 |
540 var test = runTest([]); | 540 var test = runTest([]); |
541 test.stdout.expect(consumeThrough(contains('All tests passed!'))); | 541 test.stdout.expect(consumeThrough(contains('All tests passed!'))); |
542 test.shouldExit(0); | 542 test.shouldExit(0); |
543 }); | 543 }); |
544 } | 544 } |
OLD | NEW |