aboutsummaryrefslogtreecommitdiff
path: root/test/task.c
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-11-13 16:28:13 -0500
committernodist <kevin.comas.git@gmail.com>2026-11-13 16:28:13 -0500
commitc3d23d3091c23978b12c140e6cfd964eff1d3986 (patch)
tree3342a73aea427fa19d2b0936a98e37fbe479c85d /test/task.c
parent75c8828d804f45cf8f44af73bfe87e0f3eaf9a9e (diff)
rewriteHEADmain
Diffstat (limited to 'test/task.c')
-rw-r--r--test/task.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/task.c b/test/task.c
deleted file mode 100644
index 8374989..0000000
--- a/test/task.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#include "kpl_test.h"
-
-static int32_t run_task_value = 0;
-
-#define KPL_RUN_TASK_SET_VALUE 1234567
-
-void run_task_set_value(kpl_thread *thread, kpl_object_task *object_task) {
- run_task_value = KPL_RUN_TASK_SET_VALUE;
- kpl_object_task_done(thread, object_task);
-}
-
-KPL_TEST(run_task) {
- kpl_env env = {};
- kpl_env_config(&env, -1, NULL);
- env.thread_count = 1;
- env.io_uring_queue_size_pow2 = KPL_IO_URING_QUEUE_SIZE_POW2_MIN;
- env.flags |= KPL_ENV_FLAG_RUN_FUNCTION;
- env.kpl_fn_entry = run_task_set_value;
- KPL_ASSERT(kpl_env_init(&env) == KPL_EXIT_CODE_SUCCESS, "env should init");
- KPL_ASSERT(kpl_env_run(&env) == KPL_EXIT_CODE_SUCCESS, "env should run");
- kpl_env_free(&env);
- KPL_ASSERT(run_task_value == KPL_RUN_TASK_SET_VALUE, "task should have set value");
-}