From 635b579ef297a121d5b9dac093e90d30a7c61832 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Sun, 14 Aug 2022 05:05:10 +0400 Subject: test --- source/test/unittests/thread.test.c | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 source/test/unittests/thread.test.c (limited to 'source/test') diff --git a/source/test/unittests/thread.test.c b/source/test/unittests/thread.test.c deleted file mode 100644 index fed564b..0000000 --- a/source/test/unittests/thread.test.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "../../kit/thread.h" - -#define KIT_TEST_FILE thread -#include "../../kit_test/test.h" - -static void *test_thread_fn(void *data) { - ptrdiff_t *value = (ptrdiff_t *) data; - return (void *) (*value + 20); -} - -TEST("run thread") { - pthread_t t; - ptrdiff_t value = 22; - pthread_create(&t, NULL, test_thread_fn, &value); - void *result; - pthread_join(t, &result); - REQUIRE((ptrdiff_t) result == 42); -} -- cgit v1.2.3