| 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 import 'dart:async'; | |
| 6 | |
| 7 import 'package:test/src/backend/state.dart'; | |
| 8 import 'package:test/test.dart'; | 5 import 'package:test/test.dart'; |
| 9 | 6 |
| 10 void main() { | 7 void main() { |
| 11 group("Timeout.parse", () { | 8 group("Timeout.parse", () { |
| 12 group('for "none"', () { | 9 group('for "none"', () { |
| 13 test("successfully parses", () { | 10 test("successfully parses", () { |
| 14 expect(new Timeout.parse("none"), equals(Timeout.none)); | 11 expect(new Timeout.parse("none"), equals(Timeout.none)); |
| 15 }); | 12 }); |
| 16 | 13 |
| 17 test("rejects invalid input", () { | 14 test("rejects invalid input", () { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 expect(() => new Timeout.parse("d"), throwsFormatException); | 73 expect(() => new Timeout.parse("d"), throwsFormatException); |
| 77 expect(() => new Timeout.parse("ad"), throwsFormatException); | 74 expect(() => new Timeout.parse("ad"), throwsFormatException); |
| 78 expect(() => new Timeout.parse("1z"), throwsFormatException); | 75 expect(() => new Timeout.parse("1z"), throwsFormatException); |
| 79 expect(() => new Timeout.parse("1u"), throwsFormatException); | 76 expect(() => new Timeout.parse("1u"), throwsFormatException); |
| 80 expect(() => new Timeout.parse("1d5x"), throwsFormatException); | 77 expect(() => new Timeout.parse("1d5x"), throwsFormatException); |
| 81 expect(() => new Timeout.parse("1d*5m"), throwsFormatException); | 78 expect(() => new Timeout.parse("1d*5m"), throwsFormatException); |
| 82 }); | 79 }); |
| 83 }); | 80 }); |
| 84 }); | 81 }); |
| 85 } | 82 } |
| OLD | NEW |