From 8559b6628eb31500672fc97ecdabe4e2cffa7a43 Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Fri, 26 Jul 2024 20:09:11 -0600 Subject: [PATCH] more tests --- test/src/lib_unit_tests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/src/lib_unit_tests.cpp b/test/src/lib_unit_tests.cpp index b26f4f9..4138209 100644 --- a/test/src/lib_unit_tests.cpp +++ b/test/src/lib_unit_tests.cpp @@ -402,6 +402,11 @@ Test(argv_argc, fail_perm_procargs) { cr_assert_throw({ Getargv::ArgvArgc::as_array(0); }, std::system_error); } +Test(argv_argc, not_copyable) { + cr_assert_not(std::is_copy_constructible_v); + cr_assert_not(std::is_copy_assignable_v); +} + Test(argv, simple) { const std::string expected = "bin/child\0"s; cleanup(kill_pid) pid_t const pid = spawn(expected.c_str(), expected.c_str()); @@ -499,6 +504,11 @@ Test(argv, not_exists) { cr_assert_throw({ const Getargv::Argv proc_ptrs(-1, 5, true); }, std::system_error); } +Test(argv, not_copyable) { + cr_assert_not(std::is_copy_constructible_v); + cr_assert_not(std::is_copy_assignable_v); +} + void free_strings(struct criterion_test_params* crp) { char** strings = static_cast(crp->params); for (size_t i = 0; i < crp->length; ++i) {