diff options
author | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-18 17:08:06 +0400 |
---|---|---|
committer | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-18 17:08:06 +0400 |
commit | d902f3d8050ce90ddb8f300a5e1bd76f4710ca62 (patch) | |
tree | 8873d8550ac6fef5d6f4cd18662959ef5e7fc9a4 /source/test/unittests | |
parent | 1a085098d034c62582c678fa5bf3a92eb449100d (diff) | |
download | kit-d902f3d8050ce90ddb8f300a5e1bd76f4710ca62.zip |
[thread] Stack size
Diffstat (limited to 'source/test/unittests')
-rw-r--r-- | source/test/unittests/thread.test.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/test/unittests/thread.test.c b/source/test/unittests/thread.test.c index 45fbea4..f60ad18 100644 --- a/source/test/unittests/thread.test.c +++ b/source/test/unittests/thread.test.c @@ -37,6 +37,13 @@ TEST("thread run") { REQUIRE(result == 42); } +TEST("thread stack size") { + thrd_t foo; + REQUIRE(thrd_create_with_stack(&foo, test_nothing, NULL, 200000) == + thrd_success); + REQUIRE(thrd_join(foo, NULL) == thrd_success); +} + TEST("thread equal") { thrd_t foo, bar; REQUIRE(thrd_create(&foo, test_nothing, NULL) == thrd_success); @@ -44,6 +51,8 @@ TEST("thread equal") { REQUIRE(thrd_equal(foo, foo)); REQUIRE(!thrd_equal(foo, bar)); REQUIRE(!thrd_equal(foo, thrd_current())); + REQUIRE(thrd_join(foo, NULL) == thrd_success); + REQUIRE(thrd_join(bar, NULL) == thrd_success); } TEST("thread exit") { |