File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,7 @@ struct Dependency {
427
427
428
428
This is true in particular for the `any` constant.
429
429
*/
430
+ deprecated (" Use `VersionRange.matchesAny` directly" )
430
431
bool matchesAny () const scope @safe {
431
432
return this .m_value.match! (
432
433
(Repository v) => true ,
@@ -435,13 +436,6 @@ struct Dependency {
435
436
);
436
437
}
437
438
438
- unittest {
439
- assert (Dependency(" *" ).matchesAny);
440
- assert (! Dependency(" >0.0.0" ).matchesAny);
441
- assert (! Dependency(" >=1.0.0" ).matchesAny);
442
- assert (! Dependency(" <1.0.0" ).matchesAny);
443
- }
444
-
445
439
/* * Tests if the specification matches a specific version.
446
440
*/
447
441
bool matches (string vers, VersionMatchMode mode = VersionMatchMode.standard) const @safe
@@ -962,6 +956,13 @@ private struct VersionRange
962
956
&& this .m_versB == Version.maxRelease;
963
957
}
964
958
959
+ unittest {
960
+ assert (VersionRange.fromString(" *" ).matchesAny);
961
+ assert (! VersionRange.fromString(" >0.0.0" ).matchesAny);
962
+ assert (! VersionRange.fromString(" >=1.0.0" ).matchesAny);
963
+ assert (! VersionRange.fromString(" <1.0.0" ).matchesAny);
964
+ }
965
+
965
966
public static VersionRange fromString (string ves) @safe
966
967
{
967
968
static import std.string ;
You can’t perform that action at this time.
0 commit comments