From eee985160ea23e0ad0d51c15f3ccb1ab79e49978 Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Fri, 16 Jan 2026 10:45:12 +0000 Subject: Modified 'tests_attributes.zc' --- tests/functions/test_attributes.zc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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"; } -- cgit v1.2.3