diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/functions/test_attributes.zc | 22 |
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; +} |
