aboutsummaryrefslogtreecommitdiff
path: root/tests/load/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-12-09 15:47:34 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-12-09 15:47:34 +0300
commitd259750511b3c2aaeace49f8ccb1d7f3ad561452 (patch)
tree9a98e1a2a66fc8a25dc1b58efd2e7e0e77201914 /tests/load/driver.cxx
parent4bc9390c48cee736917ead5d20aa216fe10bae47 (diff)
Prepare for supporting multiple ids in requirement alternative
Diffstat (limited to 'tests/load/driver.cxx')
-rw-r--r--tests/load/driver.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index 25403c7..bc51c8d 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -30,11 +30,25 @@ using namespace butl;
using namespace brep;
using labels = small_vector<string, 5>;
-using req_alts = small_vector<string, 1>;
static const path packages ("packages.manifest");
static const path repositories ("repositories.manifest");
+static requirement_alternatives
+req_alts (const strings& ras)
+{
+ requirement_alternatives r;
+ for (const string& s: ras)
+ {
+ requirement_alternative ra;
+ ra.push_back (s);
+
+ r.push_back (move (ra));
+ }
+
+ return r;
+}
+
static bool
check_location (shared_ptr<package>& p)
{
@@ -827,7 +841,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpvr5[3].conditional);
assert (fpvr5[3].comment == "Only if using VC++ on Windows.");
- assert (fpvr5[4][0] == "host");
+ assert (fpvr5[4][0][0] == "host");
assert (check_location (fpv5));