summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-27 12:33:58 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-27 12:33:58 +0000
commita3b85c9737b509fd2a792b65aa2365b9bcc9fe6a (patch)
tree829577514fc4f0436e61c523eb1082afe891bcbf /tests
parentb40fc44f799b4810981d37d9030ca69d768cc0b2 (diff)
Support for more attributes
Diffstat (limited to 'tests')
-rw-r--r--tests/functions/test_attributes.zc22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/functions/test_attributes.zc b/tests/functions/test_attributes.zc
index 36ca3ad..6495ba9 100644
--- a/tests/functions/test_attributes.zc
+++ b/tests/functions/test_attributes.zc
@@ -115,3 +115,25 @@ test "struct attributes" {
// Normal struct has padding
assert(sizeof(NormalStruct) == 8, "NormalStruct has padding");
}
+
+@comptime
+fn comp_helper() -> int {
+ return 123;
+}
+
+comptime {
+ let val = comp_helper();
+ assert(val == 123, "Comptime check failed!");
+}
+
+@export
+fn my_exported_func() {
+ // This function is exported
+ // I don't know how to test it over here lol.
+}
+
+@export
+struct MyExportedStruct {
+ a: int;
+ b: int;
+}