From ac696b22b3f03ae9670a9d1d154ce7ff848b5e55 Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 6 May 2026 18:48:56 +0200 Subject: Tests for new IR transpiler Signed-off-by: Mel --- boot/tests/transpile/basic.cskt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'boot/tests/transpile/basic.cskt') 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" -- cgit 1.4.1