From fe03b65c8bd952ac26a516e23f4c04bb014455e9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 16 Oct 2020 23:43:11 +0300 Subject: CommandLine: saner API --- test/unit_tests/cmd_line.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/unit_tests') 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() -- cgit v1.2.3