summaryrefslogtreecommitdiff
path: root/source/test
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-18 17:08:06 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-18 17:08:06 +0400
commitd902f3d8050ce90ddb8f300a5e1bd76f4710ca62 (patch)
tree8873d8550ac6fef5d6f4cd18662959ef5e7fc9a4 /source/test
parent1a085098d034c62582c678fa5bf3a92eb449100d (diff)
downloadkit-d902f3d8050ce90ddb8f300a5e1bd76f4710ca62.zip
[thread] Stack size
Diffstat (limited to 'source/test')
-rw-r--r--source/test/unittests/thread.test.c9
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") {