Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CamJN committed Jul 27, 2024
1 parent a441831 commit 8559b66
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/src/lib_unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Getargv::ArgvArgc>);
cr_assert_not(std::is_copy_assignable_v<Getargv::ArgvArgc>);
}

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());
Expand Down Expand Up @@ -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<Getargv::Argv>);
cr_assert_not(std::is_copy_assignable_v<Getargv::Argv>);
}

void free_strings(struct criterion_test_params* crp) {
char** strings = static_cast<char**>(crp->params);
for (size_t i = 0; i < crp->length; ++i) {
Expand Down

0 comments on commit 8559b66

Please sign in to comment.