@@ -74,54 +74,6 @@ main() {
74
74
expectNoValidationError (dependency);
75
75
});
76
76
77
- test ('depends on a feature with an appropriate SDK constraint' , () async {
78
- await d.dir (appPath, [
79
- d.libPubspec ("test_pkg" , "1.0.0" ,
80
- deps: {
81
- "foo" : {
82
- "version" : "^1.2.3" ,
83
- "features" : {"stuff" : true }
84
- }
85
- },
86
- sdk: ">=2.0.0 <3.0.0" )
87
- ]).create ();
88
- expectNoValidationError (dependency);
89
- });
90
-
91
- test ('declares a feature with an appropriate SDK constraint' , () async {
92
- await d.dir (appPath, [
93
- d.pubspec ({
94
- "name" : "test_pkg" ,
95
- "version" : "1.0.0" ,
96
- "features" : {
97
- "stuff" : {
98
- "dependencies" : {"foo" : "^1.0.0" }
99
- }
100
- },
101
- "environment" : {"sdk" : ">=2.0.0 <3.0.0" }
102
- })
103
- ]).create ();
104
- expectNoValidationError (dependency);
105
- });
106
-
107
- test ('declares a default-off feature with an appropriate SDK constraint' ,
108
- () async {
109
- await d.dir (appPath, [
110
- d.pubspec ({
111
- "name" : "test_pkg" ,
112
- "version" : "1.0.0" ,
113
- "features" : {
114
- "stuff" : {
115
- "default" : false ,
116
- "dependencies" : {"foo" : "^1.0.0" }
117
- }
118
- },
119
- "environment" : {"sdk" : ">=2.0.0 <3.0.0" }
120
- })
121
- ]).create ();
122
- expectNoValidationError (dependency);
123
- });
124
-
125
77
test ('has a git path dependency with an appropriate SDK constraint' ,
126
78
() async {
127
79
await d.dir (appPath, [
@@ -534,100 +486,35 @@ main() {
534
486
});
535
487
});
536
488
537
- group ('has a feature dependency' , () {
538
- test ('without an SDK constraint' , () async {
539
- await d.dir (appPath, [
540
- d.libPubspec ("test_pkg" , "1.0.0" , deps: {
541
- "foo" : {
542
- "version" : "^1.2.3" ,
543
- "features" : {"stuff" : true }
544
- }
545
- })
546
- ]).create ();
547
-
548
- expectDependencyValidationError (' sdk: ">=2.0.0 <3.0.0"' );
549
- });
550
-
551
- test ('with a too-broad SDK constraint' , () async {
552
- await d.dir (appPath, [
553
- d.libPubspec ("test_pkg" , "1.0.0" ,
554
- deps: {
555
- "foo" : {
556
- "version" : "^1.2.3" ,
557
- "features" : {"stuff" : true }
558
- }
559
- },
560
- sdk: ">=1.24.0 <3.0.0" )
561
- ]).create ();
489
+ test ('has a feature dependency' , () async {
490
+ await d.dir (appPath, [
491
+ d.libPubspec ("test_pkg" , "1.0.0" , deps: {
492
+ "foo" : {
493
+ "version" : "^1.2.3" ,
494
+ "features" : {"stuff" : true }
495
+ }
496
+ })
497
+ ]).create ();
562
498
563
- expectDependencyValidationError (' sdk: ">=2.0.0 <3.0.0"' );
564
- } );
499
+ expectDependencyValidationError (
500
+ "Packages with package features may not be published yet." );
565
501
});
566
502
567
- group ('declares a feature' , () {
568
- test ('without an constraint' , () async {
569
- await d.dir (appPath, [
570
- d.pubspec ({
571
- "name" : "test_pkg" ,
572
- "version" : "1.0.0" ,
573
- "features" : {
574
- "stuff" : {
575
- "dependencies" : {"foo" : "^1.0.0" }
576
- }
503
+ test ('declares a feature' , () async {
504
+ await d.dir (appPath, [
505
+ d.pubspec ({
506
+ "name" : "test_pkg" ,
507
+ "version" : "1.0.0" ,
508
+ "features" : {
509
+ "stuff" : {
510
+ "dependencies" : {"foo" : "^1.0.0" }
577
511
}
578
- })
579
- ]).create ();
580
- expectDependencyValidationError (' sdk: ">=2.0.0 <3.0.0"' );
581
- });
582
-
583
- test ('with a too-broad SDK constraint' , () async {
584
- await d.dir (appPath, [
585
- d.pubspec ({
586
- "name" : "test_pkg" ,
587
- "version" : "1.0.0" ,
588
- "features" : {
589
- "stuff" : {
590
- "dependencies" : {"foo" : "^1.0.0" }
591
- }
592
- },
593
- "environment" : {"sdk" : ">=1.24.0 <3.0.0" }
594
- })
595
- ]).create ();
596
- expectDependencyValidationError (' sdk: ">=2.0.0 <3.0.0"' );
597
- });
598
-
599
- test ('with an explicit default and a too-broad SDK constraint' , () async {
600
- await d.dir (appPath, [
601
- d.pubspec ({
602
- "name" : "test_pkg" ,
603
- "version" : "1.0.0" ,
604
- "features" : {
605
- "stuff" : {
606
- "default" : true ,
607
- "dependencies" : {"foo" : "^1.0.0" }
608
- }
609
- },
610
- "environment" : {"sdk" : ">=1.24.0 <3.0.0" }
611
- })
612
- ]).create ();
613
- expectDependencyValidationError (' sdk: ">=2.0.0 <3.0.0"' );
614
- });
512
+ }
513
+ })
514
+ ]).create ();
615
515
616
- test ('with an invalid dependency' , () async {
617
- await d.dir (appPath, [
618
- d.pubspec ({
619
- "name" : "test_pkg" ,
620
- "version" : "1.0.0" ,
621
- "features" : {
622
- "stuff" : {
623
- "dependencies" : {"foo" : "1.2.3" }
624
- }
625
- },
626
- "environment" : {"sdk" : ">=2.0.0 <3.0.0" }
627
- })
628
- ]).create ();
629
- expectDependencyValidationWarning (' foo: ^1.2.3' );
630
- });
516
+ expectDependencyValidationError (
517
+ "Packages with package features may not be published yet." );
631
518
});
632
519
633
520
test ('depends on Flutter from a non-SDK source' , () async {
0 commit comments