summaryrefslogtreecommitdiff
path: root/libcr/tests/test_matrix.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-24 23:02:59 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-25 08:27:46 -0700
commit839c3c83993b2b8d9d6be20407afdf59be23e701 (patch)
treebfc896e886dcee25955af8db3ed455f8e598f2bb /libcr/tests/test_matrix.c
parent1ff1f0e3c26e40a92d56630a092d65fac9655b64 (diff)
libcr: Add very basic tests
Diffstat (limited to 'libcr/tests/test_matrix.c')
-rw-r--r--libcr/tests/test_matrix.c20
1 files changed, 20 insertions, 0 deletions
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 <lukeshu@lukeshu.com>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+#include <stdlib.h> /* for exit(3) */
+
+#include <libcr/coroutine.h>
+
+COROUTINE cr_init(void *) {
+ cr_begin();
+ exit(0);
+ cr_end();
+}
+
+int main() {
+ coroutine_add("init", cr_init, NULL);
+ coroutine_main();
+}