diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2021-01-15 12:35:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-15 12:35:48 -0800 |
| commit | 4f8fb510ba03f195a49f6353b97fabf5bb20d450 (patch) | |
| tree | 7564b1db60e1086ce5cf587846ea28d628735d05 /toolsrc/src/vcpkg-test/dependencies.cpp | |
| parent | a8e97d4a4b22d489123dc6d673ceee2c203dc046 (diff) | |
| download | vcpkg-4f8fb510ba03f195a49f6353b97fabf5bb20d450.tar.gz vcpkg-4f8fb510ba03f195a49f6353b97fabf5bb20d450.zip | |
[vcpkg] Add initial versioning documentation (#15565)
* [vcpkg] Improve efficiency and tests of versioning
* [vcpkg] Add initial versioning documentation and rename x-default-baseline to builtin-baseline
* [vcpkg] Enable metrics for builtin-baseline & overrides
* [vcpkg] Address PR comments
* [vcpkg] Add support for syntax in version>=
* [vcpkg] Remove port-version from dependency syntax
* [vcpkg] Address CR comment
* [vcpkg] Minor docs fixup
Diffstat (limited to 'toolsrc/src/vcpkg-test/dependencies.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg-test/dependencies.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/toolsrc/src/vcpkg-test/dependencies.cpp b/toolsrc/src/vcpkg-test/dependencies.cpp index 2831ea5a1..8f936abc3 100644 --- a/toolsrc/src/vcpkg-test/dependencies.cpp +++ b/toolsrc/src/vcpkg-test/dependencies.cpp @@ -196,7 +196,7 @@ private: static const MockOverlayProvider s_empty_mock_overlay; -ExpectedS<Dependencies::ActionPlan> create_versioned_install_plan( +static ExpectedS<Dependencies::ActionPlan> create_versioned_install_plan( const PortFileProvider::IVersionedPortfileProvider& provider, const PortFileProvider::IBaselineProvider& bprovider, const CMakeVars::CMakeVarProvider& var_provider, @@ -335,7 +335,7 @@ TEST_CASE ("basic version install scheme baseline missing success", "[versionpla bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "2"}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2"}}, }, {}, toplevel_spec())); @@ -375,7 +375,7 @@ TEST_CASE ("version string baseline agree", "[versionplan]") MockCMakeVarProvider var_provider; auto install_plan = create_versioned_install_plan( - vp, bp, var_provider, {Dependency{"a", {}, {}, {Constraint::Type::Exact, "2"}}}, {}, toplevel_spec()); + vp, bp, var_provider, {Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2"}}}, {}, toplevel_spec()); REQUIRE(install_plan.has_value()); } @@ -396,7 +396,7 @@ TEST_CASE ("version install scheme baseline conflict", "[versionplan]") bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "3"}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "3"}}, }, {}, toplevel_spec()); @@ -421,7 +421,7 @@ TEST_CASE ("version install string port version", "[versionplan]") bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "2", 1}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2", 1}}, }, {}, toplevel_spec())); @@ -447,7 +447,7 @@ TEST_CASE ("version install string port version 2", "[versionplan]") bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "2", 0}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2", 0}}, }, {}, toplevel_spec())); @@ -463,10 +463,10 @@ TEST_CASE ("version install transitive string", "[versionplan]") MockVersionedPortfileProvider vp; vp.emplace("a", {"2", 0}).source_control_file->core_paragraph->dependencies = { - Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Exact, "1"}}, + Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Minimum, "1"}}, }; vp.emplace("a", {"2", 1}).source_control_file->core_paragraph->dependencies = { - Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Exact, "2"}}, + Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Minimum, "2"}}, }; vp.emplace("b", {"1", 0}); vp.emplace("b", {"2", 0}); @@ -478,7 +478,7 @@ TEST_CASE ("version install transitive string", "[versionplan]") bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "2", 1}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2", 1}}, }, {}, toplevel_spec())); @@ -1006,7 +1006,7 @@ TEST_CASE ("version install scheme change in port version", "[versionplan]") { MockVersionedPortfileProvider vp; vp.emplace("a", {"2", 0}).source_control_file->core_paragraph->dependencies = { - Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Exact, "1"}}, + Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Minimum, "1"}}, }; vp.emplace("a", {"2", 1}).source_control_file->core_paragraph->dependencies = { Dependency{"b", {}, {}, DependencyConstraint{Constraint::Type::Minimum, "1", 1}}, @@ -1026,7 +1026,7 @@ TEST_CASE ("version install scheme change in port version", "[versionplan]") bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "2", 1}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2", 1}}, }, {}, toplevel_spec())); @@ -1045,7 +1045,7 @@ TEST_CASE ("version install scheme change in port version", "[versionplan]") bp, var_provider, { - Dependency{"a", {}, {}, {Constraint::Type::Exact, "2", 0}}, + Dependency{"a", {}, {}, {Constraint::Type::Minimum, "2", 0}}, }, {}, toplevel_spec())); @@ -1305,7 +1305,8 @@ TEST_CASE ("version install transitive overrides", "[versionplan]") MockVersionedPortfileProvider vp; vp.emplace("b", {"1", 0}, Scheme::Relaxed) - .source_control_file->core_paragraph->dependencies.push_back({"c", {}, {}, {Constraint::Type::Exact, "2", 1}}); + .source_control_file->core_paragraph->dependencies.push_back( + {"c", {}, {}, {Constraint::Type::Minimum, "2", 1}}); vp.emplace("b", {"2", 0}, Scheme::Relaxed); vp.emplace("c", {"1", 0}, Scheme::String); vp.emplace("c", {"2", 1}, Scheme::String); |
