OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 * Description text of the current test group. If multiple groups are nested, | 6 * Description text of the current test group. If multiple groups are nested, |
7 * this will contain all of their text concatenated. | 7 * this will contain all of their text concatenated. |
8 */ | 8 */ |
9 String _currentGroup = ''; | 9 String _currentGroup = ''; |
10 | 10 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 String stackTrace; | 329 String stackTrace; |
330 | 330 |
331 TestCase(this.id, this.description, this.test, this.callbacks); | 331 TestCase(this.id, this.description, this.test, this.callbacks); |
332 | 332 |
333 bool get isComplete() => result != null; | 333 bool get isComplete() => result != null; |
334 | 334 |
335 void pass() { | 335 void pass() { |
336 result = _PASS; | 336 result = _PASS; |
337 } | 337 } |
338 | 338 |
339 void fail(String message, String stackTrace) { | 339 void fail(String message_, String stackTrace_) { |
340 result = _FAIL; | 340 result = _FAIL; |
341 this.message = message; | 341 this.message = message_; |
342 this.stackTrace = stackTrace; | 342 this.stackTrace = stackTrace_; |
343 } | 343 } |
344 | 344 |
345 void error(String message, String stackTrace) { | 345 void error(String message_, String stackTrace_) { |
346 result = _ERROR; | 346 result = _ERROR; |
347 this.message = message; | 347 this.message = message_; |
348 this.stackTrace = stackTrace; | 348 this.stackTrace = stackTrace_; |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 typedef void TestFunction(); | 352 typedef void TestFunction(); |
OLD | NEW |