diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-16 10:45:12 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-16 10:45:12 +0000 |
| commit | eee985160ea23e0ad0d51c15f3ccb1ab79e49978 (patch) | |
| tree | b95d3a6b4abf6628c3329617decf8ccaa04fa67c /tests | |
| parent | 8b32e90238dd3dc098cbb5a61729912af733c7af (diff) | |
Modified 'tests_attributes.zc'
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/functions/test_attributes.zc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/functions/test_attributes.zc b/tests/functions/test_attributes.zc index db77d89..fef6a49 100644 --- a/tests/functions/test_attributes.zc +++ b/tests/functions/test_attributes.zc @@ -6,7 +6,7 @@ fn compute() -> int { @deprecated("Use new_version instead") fn old_function() { - "deprecated!"; + println "deprecated!"; } @inline @@ -94,8 +94,8 @@ test "function attributes" { var c = combined(); assert(c == 100, "combined failed"); - // @must_use: discarding should warn - compute(); + // @must_use: result verified + assert(compute() == 42, "Checking must_use result"); // Check constructor ran assert(init_called == 1, "Constructor attribute failed"); @@ -103,7 +103,7 @@ test "function attributes" { // Check noinline compiles and runs assert(complex_calc(10) == 20, "Noinline function failed"); - "Function attributes OK"; + println "Function attributes OK"; } test "struct attributes" { @@ -118,5 +118,5 @@ test "struct attributes" { // Normal struct has padding assert(sizeof(NormalStruct) == 8, "NormalStruct has padding"); - "Struct attributes OK"; + println "Struct attributes OK"; } |
