From 839c3c83993b2b8d9d6be20407afdf59be23e701 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 24 Nov 2024 23:02:59 -0700 Subject: libcr: Add very basic tests --- libcr/tests/test_matrix.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libcr/tests/test_matrix.c (limited to 'libcr/tests/test_matrix.c') diff --git a/libcr/tests/test_matrix.c b/libcr/tests/test_matrix.c new file mode 100644 index 0000000..f1aa6fe --- /dev/null +++ b/libcr/tests/test_matrix.c @@ -0,0 +1,20 @@ +/* libcr/tests/test_matrix.c - Tests for libcr + * + * Copyright (C) 2024 Luke T. Shumaker + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +#include /* for exit(3) */ + +#include + +COROUTINE cr_init(void *) { + cr_begin(); + exit(0); + cr_end(); +} + +int main() { + coroutine_add("init", cr_init, NULL); + coroutine_main(); +} -- cgit v1.2.3-2-g168b