diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2020-02-07 11:24:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-07 11:24:35 -0800 |
| commit | 8db6db5dac70c25b04cd4dd84392484dee822fbe (patch) | |
| tree | 4734de271f966ff4b9a913b15c1b7b537ecd1a8d /toolsrc/src/vcpkg-test/statusparagraphs.cpp | |
| parent | 2873f07823df192ba55693d200850669eabe332c (diff) | |
| download | vcpkg-8db6db5dac70c25b04cd4dd84392484dee822fbe.tar.gz vcpkg-8db6db5dac70c25b04cd4dd84392484dee822fbe.zip | |
[vcpkg] Further parser improvements (#9895)
* [vcpkg] Consolidate several internal parsers together (packagespecs + logicexpression + control) and enhance error messages
* [vcpkg] Migrate Build-Depends parsing to new framework
* [vcpkg] Fix tests. Re-enable underscores in feature names due to libwebp[vwebp_sdl] -- todo: rename this feature and remove underscores.
Diffstat (limited to 'toolsrc/src/vcpkg-test/statusparagraphs.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg-test/statusparagraphs.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/toolsrc/src/vcpkg-test/statusparagraphs.cpp b/toolsrc/src/vcpkg-test/statusparagraphs.cpp index 88b499118..c755948b5 100644 --- a/toolsrc/src/vcpkg-test/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg-test/statusparagraphs.cpp @@ -18,14 +18,15 @@ Architecture: x64-windows Multi-Arch: same Description: Status: install ok installed -)"); +)", + ""); REQUIRE(pghs); StatusParagraphs status_db( Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); + auto it = status_db.find_installed({"ffmpeg", Triplet::X64_WINDOWS}); REQUIRE(it != status_db.end()); } @@ -38,14 +39,15 @@ Architecture: x64-windows Multi-Arch: same Description: Status: purge ok not-installed -)"); +)", + ""); REQUIRE(pghs); StatusParagraphs status_db( Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); + auto it = status_db.find_installed({"ffmpeg", Triplet::X64_WINDOWS}); REQUIRE(it == status_db.end()); } @@ -66,18 +68,19 @@ Architecture: x64-windows Multi-Arch: same Description: Status: purge ok not-installed -)"); +)", + ""); REQUIRE(pghs); StatusParagraphs status_db( Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); + auto it = status_db.find_installed({"ffmpeg", Triplet::X64_WINDOWS}); REQUIRE(it != status_db.end()); // Feature "openssl" is not installed and should not be found - auto it1 = status_db.find_installed({unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS), "openssl"}); + auto it1 = status_db.find_installed({{"ffmpeg", Triplet::X64_WINDOWS}, "openssl"}); REQUIRE(it1 == status_db.end()); } @@ -98,13 +101,14 @@ Architecture: x64-windows Multi-Arch: same Description: Status: install ok installed -)"); +)", + ""); REQUIRE(pghs); StatusParagraphs status_db( Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); // Feature "openssl" is installed and should therefore be found - auto it = status_db.find_installed({unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS), "openssl"}); + auto it = status_db.find_installed({{"ffmpeg", Triplet::X64_WINDOWS}, "openssl"}); REQUIRE(it != status_db.end()); } |
