about summary refs log tree commit diff
path: root/boot/tests/transpile/basic.cskt
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-05-06 18:48:56 +0200
committerMel <mel@rnrd.eu>2026-05-06 18:48:56 +0200
commitac696b22b3f03ae9670a9d1d154ce7ff848b5e55 (patch)
treee1f7ac3e1cd1f545d1ab0c1dc5c19130a9b23c5f /boot/tests/transpile/basic.cskt
parent3850a7b311bca7bae925aeea456a41036f116ebd (diff)
downloadcatskill-ac696b22b3f03ae9670a9d1d154ce7ff848b5e55.tar.zst
catskill-ac696b22b3f03ae9670a9d1d154ce7ff848b5e55.zip
Tests for new IR transpiler
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/tests/transpile/basic.cskt')
-rw-r--r--boot/tests/transpile/basic.cskt16
1 files changed, 12 insertions, 4 deletions
diff --git a/boot/tests/transpile/basic.cskt b/boot/tests/transpile/basic.cskt
index eb22b84..5844f94 100644
--- a/boot/tests/transpile/basic.cskt
+++ b/boot/tests/transpile/basic.cskt
@@ -1,7 +1,9 @@
-the transpiler has to follow a simple pattern of
-the files it creates to make viable c source.
-here we check that the simplest possible file has
-all of the expected parts needed.
+smoke test for the ir-driven transpiler: every translation
+unit starts with the core preamble, optionally declares types
+(forward + full def in topological order), then forward-decls
+all functions, then bodies, then the runtime trailer when a
+`main` is present. `main` is renamed to `catskill_main` so the
+runtime can wrap it.
 
 <<<
 
@@ -9,3 +11,9 @@ main = fun () {
 }
 
 >>>
+
+#include "core.c"
+void catskill_main(void);
+void catskill_main(void) {
+}
+#include "runtime.c"