| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
| 6 * Classes and methods for executing tests. | 6 * Classes and methods for executing tests. |
| 7 * | 7 * |
| 8 * This module includes: | 8 * This module includes: |
| 9 * - Managing parallel execution of tests, including timeout checks. | 9 * - Managing parallel execution of tests, including timeout checks. |
| 10 * - Evaluating the output of each test as pass/fail/crash/timeout. | 10 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1784 } | 1784 } |
| 1785 } | 1785 } |
| 1786 | 1786 |
| 1787 List<int> _truncatedTail() => tail.length > TAIL_LENGTH | 1787 List<int> _truncatedTail() => tail.length > TAIL_LENGTH |
| 1788 ? tail.sublist(tail.length - TAIL_LENGTH) | 1788 ? tail.sublist(tail.length - TAIL_LENGTH) |
| 1789 : tail; | 1789 : tail; |
| 1790 | 1790 |
| 1791 void _checkUtf8(List<int> data) { | 1791 void _checkUtf8(List<int> data) { |
| 1792 try { | 1792 try { |
| 1793 UTF8.decode(data, allowMalformed: false); | 1793 UTF8.decode(data, allowMalformed: false); |
| 1794 } on FormatException catch (e) { | 1794 } on FormatException { |
| 1795 hasNonUtf8 = true; | 1795 hasNonUtf8 = true; |
| 1796 String malformed = UTF8.decode(data, allowMalformed: true); | 1796 String malformed = UTF8.decode(data, allowMalformed: true); |
| 1797 data | 1797 data |
| 1798 ..clear() | 1798 ..clear() |
| 1799 ..addAll(UTF8.encode(malformed)) | 1799 ..addAll(UTF8.encode(malformed)) |
| 1800 ..addAll(""" | 1800 ..addAll(""" |
| 1801 | 1801 |
| 1802 ***************************************************************************** | 1802 ***************************************************************************** |
| 1803 | 1803 |
| 1804 test.dart: The output of this test contained non-UTF8 formatted data. | 1804 test.dart: The output of this test contained non-UTF8 formatted data. |
| (...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3241 } | 3241 } |
| 3242 } | 3242 } |
| 3243 | 3243 |
| 3244 void eventAllTestsDone() { | 3244 void eventAllTestsDone() { |
| 3245 for (var listener in _eventListener) { | 3245 for (var listener in _eventListener) { |
| 3246 listener.allDone(); | 3246 listener.allDone(); |
| 3247 } | 3247 } |
| 3248 _allDone(); | 3248 _allDone(); |
| 3249 } | 3249 } |
| 3250 } | 3250 } |
| OLD | NEW |