aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-15 01:15:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-15 01:21:31 +0300
commit735a762860b9d998dd3f5f8a62146ec7d89e5fd9 (patch)
tree574fd76f2c712bffc73ed5f1d404313ae2161e1d
parenttest/ -> test/unit_tests/ (diff)
downloadwinapi-common-735a762860b9d998dd3f5f8a62146ec7d89e5fd9.tar.gz
winapi-common-735a762860b9d998dd3f5f8a62146ec7d89e5fd9.zip
test: add test utility "args"
-rw-r--r--test/CMakeLists.txt8
-rw-r--r--test/args.cpp13
2 files changed, 21 insertions, 0 deletions
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 "$<TARGET_PDB_FILE:args>" 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 <Egor.Tensin@gmail.com>
+// 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 <iostream>
+
+int wmain(int argc, wchar_t* argv[]) {
+ for (int i = 0; i < argc; ++i) {
+ std::wcout << argv[i] << L'\n';
+ }
+ return 0;
+}