diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-07-05 23:12:31 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-07-31 14:37:41 +0300 |
commit | a5fc06daa1c3511ae02cca811e0ad691993b5ed4 (patch) | |
tree | 46b2f1fa541569174a67c723dbc20aef73a2668b | |
parent | 064536ef079051dd0af53b7f311bef4aa4670ccb (diff) |
Add disabled test for butl::optional use case described in libstud-optional GH issue #1
-rw-r--r-- | tests/optional/driver.cxx | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tests/optional/driver.cxx b/tests/optional/driver.cxx index da09cf5..63254b5 100644 --- a/tests/optional/driver.cxx +++ b/tests/optional/driver.cxx @@ -2,7 +2,8 @@ // license : MIT; see accompanying LICENSE file #include <vector> -#include <utility> // move() +#include <string> +#include <utility> // move(), pair #include <libbutl/optional.hxx> @@ -27,7 +28,24 @@ main () { using butl::optional; - optional<move_only> r; - vector<optional<move_only>> rs; - rs.emplace_back (move (r)); + { + optional<move_only> r; + vector<optional<move_only>> rs; + rs.emplace_back (move (r)); + } + + // See https://github.com/libstud/libstud-optional/issues/1 for details. + // +#if 0 + { + vector<pair<string, optional<string>>> options; + auto add = [&options] (string o, optional<string> v = {}) + { + options.emplace_back (move (o), move (v)); + }; + + add ("-usb"); + add ("-device", "usb-kbd"); + } +#endif } |