Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Side by Side Diff: sdk/lib/_internal/pub_generated/test/validator/sdk_constraint_test.dart

Issue 937243002: Revert "Revert "Use native async/await support in pub."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 import 'dart:async';
6 import 'dart:convert';
7
8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart';
10 import 'package:path/path.dart' as path;
11 import 'package:scheduled_test/scheduled_test.dart';
12
13 import '../../lib/src/entrypoint.dart';
14 import '../../lib/src/validator.dart';
15 import '../../lib/src/validator/sdk_constraint.dart';
16 import '../descriptor.dart' as d;
17 import '../test_pub.dart';
18 import 'utils.dart';
19
20 Validator sdkConstraint(Entrypoint entrypoint) =>
21 new SdkConstraintValidator(entrypoint);
22
23 main() {
24 initConfig();
25
26 group('should consider a package valid if it', () {
27 integration('has no SDK constraint', () {
28 d.validPackage.create();
29 expectNoValidationError(sdkConstraint);
30 });
31
32 integration('has an SDK constraint without ^', () {
33 d.dir(
34 appPath,
35 [d.libPubspec("test_pkg", "1.0.0", sdk: ">=1.8.0 <2.0.0")]).create();
36 expectNoValidationError(sdkConstraint);
37 });
38 });
39
40 test(
41 "should consider a package invalid if it has an SDK constraint with " "^",
42 () {
43 d.dir(appPath, [d.libPubspec("test_pkg", "1.0.0", sdk: "^1.8.0")]).create();
44 expect(
45 schedulePackageValidation(sdkConstraint),
46 completion(pairOf(anyElement(contains('">=1.8.0 <2.0.0"')), isEmpty)));
47 });
48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698