aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-18 04:05:48 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-18 04:08:01 +0300
commit512a25658dd6b737a16b91fb7eba43deef004d87 (patch)
treee9b5fe69f55d9e1ca124b13814f01f280778c165 /test
parentProcess: add get_exe_path() (diff)
downloadwinapi-common-512a25658dd6b737a16b91fb7eba43deef004d87.tar.gz
winapi-common-512a25658dd6b737a16b91fb7eba43deef004d87.zip
add Sid class
It's another newcomer straight from privilege-check.
Diffstat (limited to 'test')
-rw-r--r--test/unit_tests/sid.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit_tests/sid.cpp b/test/unit_tests/sid.cpp
new file mode 100644
index 0000000..757f6f4
--- /dev/null
+++ b/test/unit_tests/sid.cpp
@@ -0,0 +1,19 @@
+// 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 <winapi/sid.hpp>
+
+#include <boost/test/unit_test.hpp>
+
+using namespace winapi;
+
+BOOST_AUTO_TEST_SUITE(sid_tests)
+
+BOOST_AUTO_TEST_CASE(builtin_administrators) {
+ const auto sid = Sid::builtin_administrators();
+ BOOST_TEST(sid.to_string() == "S-1-5-32-544");
+}
+
+BOOST_AUTO_TEST_SUITE_END()