OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub | 5 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub |
6 /// tests are integration tests that stage some stuff on the file system, run | 6 /// tests are integration tests that stage some stuff on the file system, run |
7 /// pub, and then validate the results. This library provides an API to build | 7 /// pub, and then validate the results. This library provides an API to build |
8 /// tests like that. | 8 /// tests like that. |
9 library test_pub; | 9 library test_pub; |
10 | 10 |
11 import 'dart:async'; | 11 import 'dart:async'; |
12 import 'dart:collection' show Queue; | 12 import 'dart:collection' show Queue; |
13 import 'dart:io' hide sleep; | 13 import 'dart:io' hide sleep; |
14 import 'dart:json' as json; | 14 import 'dart:json' as json; |
15 import 'dart:math'; | 15 import 'dart:math'; |
16 import 'dart:uri'; | |
17 import 'dart:utf'; | 16 import 'dart:utf'; |
18 | 17 |
19 import 'package:http/testing.dart'; | 18 import 'package:http/testing.dart'; |
20 import 'package:oauth2/oauth2.dart' as oauth2; | 19 import 'package:oauth2/oauth2.dart' as oauth2; |
21 import 'package:pathos/path.dart' as path; | 20 import 'package:pathos/path.dart' as path; |
22 import 'package:scheduled_test/scheduled_process.dart'; | 21 import 'package:scheduled_test/scheduled_process.dart'; |
23 import 'package:scheduled_test/scheduled_server.dart'; | 22 import 'package:scheduled_test/scheduled_server.dart'; |
24 import 'package:scheduled_test/scheduled_test.dart'; | 23 import 'package:scheduled_test/scheduled_test.dart'; |
25 import 'package:yaml/yaml.dart'; | 24 import 'package:yaml/yaml.dart'; |
26 | 25 |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 bool matches(item, MatchState matchState) { | 741 bool matches(item, MatchState matchState) { |
743 if (item is! Pair) return false; | 742 if (item is! Pair) return false; |
744 return _firstMatcher.matches(item.first, matchState) && | 743 return _firstMatcher.matches(item.first, matchState) && |
745 _lastMatcher.matches(item.last, matchState); | 744 _lastMatcher.matches(item.last, matchState); |
746 } | 745 } |
747 | 746 |
748 Description describe(Description description) { | 747 Description describe(Description description) { |
749 description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]); | 748 description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]); |
750 } | 749 } |
751 } | 750 } |
OLD | NEW |