From d902f3d8050ce90ddb8f300a5e1bd76f4710ca62 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Thu, 18 Aug 2022 17:08:06 +0400 Subject: [thread] Stack size --- source/test/unittests/thread.test.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/test') 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") { -- cgit v1.2.3