diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 06:22:49 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 06:24:45 +0100 |
| commit | 9ff9bf184558f47f83c44196a05983a49f5bdf16 (patch) | |
| tree | 98b7a0dce73cf5a3a4674370c20c695aac6e3963 /snippets/test_snippets | |
| parent | b64851f5c5654f9f28bd18b42155e5daea8c7e50 (diff) | |
[FEAT] CompilerKit testing coverage additions and 64-bit assembler patches.compiler_kit-test-additions
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'snippets/test_snippets')
| -rw-r--r-- | snippets/test_snippets/inner.nc | 11 | ||||
| -rw-r--r-- | snippets/test_snippets/test_ostream.nc | 9 | ||||
| -rw-r--r-- | snippets/test_snippets/test_printf.nc | 11 | ||||
| -rw-r--r-- | snippets/test_snippets/test_struct.nc | 20 |
4 files changed, 51 insertions, 0 deletions
diff --git a/snippets/test_snippets/inner.nc b/snippets/test_snippets/inner.nc new file mode 100644 index 0000000..5d90b41 --- /dev/null +++ b/snippets/test_snippets/inner.nc @@ -0,0 +1,11 @@ +extern exit; + +let main() +{ + let foo := 42; + + const ret_stub(): + foo := 0x10; + exit(foo); + return 0x0; +} diff --git a/snippets/test_snippets/test_ostream.nc b/snippets/test_snippets/test_ostream.nc new file mode 100644 index 0000000..0d0410b --- /dev/null +++ b/snippets/test_snippets/test_ostream.nc @@ -0,0 +1,9 @@ +#include <GenericsLibrary/ostream.nhh> + +let main() +{ + let io := 0; + io := ostream{}; + let arr := io.read(0, 0); + return arr; +}
\ No newline at end of file diff --git a/snippets/test_snippets/test_printf.nc b/snippets/test_snippets/test_printf.nc new file mode 100644 index 0000000..c29bb05 --- /dev/null +++ b/snippets/test_snippets/test_printf.nc @@ -0,0 +1,11 @@ +export main; + +let main() +{ + if (0x01 =: 0x01): + { + return 0; + } + + return 1; +}
\ No newline at end of file diff --git a/snippets/test_snippets/test_struct.nc b/snippets/test_snippets/test_struct.nc new file mode 100644 index 0000000..71a9492 --- /dev/null +++ b/snippets/test_snippets/test_struct.nc @@ -0,0 +1,20 @@ +extern exit; +extern malloc; + +let construct_foo() +{ + let io := 0; + io := malloc(4); + + return io; +} + +let main() +{ + let io := 0x0; + io := construct_foo(); + + _ := exit(io); + + return first_number; +}
\ No newline at end of file |
