aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/unit_tests/cmd_line.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-16 23:43:11 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-16 23:43:11 +0300
commitfe03b65c8bd952ac26a516e23f4c04bb014455e9 (patch)
tree6881a7039c95f502409623441b7b5e29bd02a3d4 /test/unit_tests/cmd_line.cpp
parentsome more process creation tests (diff)
downloadwinapi-common-fe03b65c8bd952ac26a516e23f4c04bb014455e9.tar.gz
winapi-common-fe03b65c8bd952ac26a516e23f4c04bb014455e9.zip
CommandLine: saner API
Diffstat (limited to 'test/unit_tests/cmd_line.cpp')
-rw-r--r--test/unit_tests/cmd_line.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit_tests/cmd_line.cpp b/test/unit_tests/cmd_line.cpp
index 4506304..99646ff 100644
--- a/test/unit_tests/cmd_line.cpp
+++ b/test/unit_tests/cmd_line.cpp
@@ -13,7 +13,7 @@ BOOST_AUTO_TEST_SUITE(cmd_line_tests)
BOOST_AUTO_TEST_CASE(query) {
const auto cmd_line = winapi::CommandLine::query();
- BOOST_TEST(cmd_line.has_argv0());
+ BOOST_TEST(!cmd_line.get_argv0().empty());
BOOST_TEST_MESSAGE(cmd_line.get_argv0());
}
@@ -25,10 +25,10 @@ BOOST_AUTO_TEST_CASE(escape) {
LR"(path\to\dir\)",
LR"(weird\\argument)",
};
- const auto cmd_line = winapi::CommandLine::build_from_main(5, argv);
+ const auto cmd_line = winapi::CommandLine::from_main(5, argv);
const auto expected =
R"("test.exe" "arg1 arg2" "path\to\file" "path\to\dir\\" "weird\\argument")";
- BOOST_TEST(cmd_line.join() == expected);
+ BOOST_TEST(cmd_line.to_string() == expected);
}
BOOST_AUTO_TEST_SUITE_END()