From 735a762860b9d998dd3f5f8a62146ec7d89e5fd9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 15 Oct 2020 01:15:40 +0300 Subject: test: add test utility "args" --- test/CMakeLists.txt | 8 ++++++++ test/args.cpp | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/args.cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bed23ce..a46bf49 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1 +1,9 @@ +add_executable(args args.cpp) +set_target_properties(args PROPERTIES OUTPUT_NAME winapi-common-test-args) + +install(TARGETS args RUNTIME DESTINATION bin) +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + install(FILES "$" DESTINATION bin OPTIONAL) +endif() + add_subdirectory(unit_tests) diff --git a/test/args.cpp b/test/args.cpp new file mode 100644 index 0000000..470819a --- /dev/null +++ b/test/args.cpp @@ -0,0 +1,13 @@ +// Copyright (c) 2020 Egor Tensin +// This file is part of the "winapi-common" project. +// For details, see https://github.com/egor-tensin/winapi-common. +// Distributed under the MIT License. + +#include + +int wmain(int argc, wchar_t* argv[]) { + for (int i = 0; i < argc; ++i) { + std::wcout << argv[i] << L'\n'; + } + return 0; +} -- cgit v1.2.3