❯ make test-verbose cargo build --release warning: unused variable: `expected_type` --> src/compiler/ir/mod.rs:3508:9 | 3508 | expected_type: Option<&str>, | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expected_type` | = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: method `lower_global_function_call` is never used --> src/compiler/ir/mod.rs:3504:8 | 607 | impl<'a> FunctionBuilder<'a> { | ---------------------------- method in this implementation ... 3504 | fn lower_global_function_call( | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: `ncc` (lib) generated 2 warnings Finished `release` profile [optimized] target(s) in 0.02s Running tests with verbose output... ==================== array_range.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running array_range.nc... --- Basic Slice --- [0, 1, 1, 2, 3] [1, 2, 3, 5] --- Step Slice --- [0, 1, 3, 8, 21, 55] FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== array_simple.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running array_simple.nc... Array created Index: 0 Index: 1 Index: 2 Done FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== assert.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running assert.nc... Assert passed: x < y Assert passed: x != y Assert passed: true All assertions passed! FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== async_await.fail.nc ==================== Expected: FAIL check (legacy) Error: expected function call after 'async' --> tests/async_await.fail.nc:12:26 | 12 | int* future = async 5 | ^ | here Error: compilation halted: 1 errors emitted FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED (error as expected) ==================== async_error_handling.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running async_error_handling.nc... Success! Value: 42 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== async.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running async.nc... Result from async call: 5050 Result 2: 5050 Result 3: 5050 All async operations completed! FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== async_type_mismatch.fail.nc ==================== Expected: FAIL check (legacy) Error: cannot initialize variable 'result' of type 'int' with value of type 'int*' --> tests/async_type_mismatch.fail.nc:10:5 | 10 | int result = async returnsInt() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Error: cannot await non-Future type 'int' --> tests/async_type_mismatch.fail.nc:14:19 | 14 | int y = await x | ^ | Error: type validation failed FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED (error as expected) ==================== builtins_combined.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running builtins_combined.nc... new(int) = 0 int("789") = 789 Assert passed: val = 100 str(new(int)) = "0" All builtin function tests passed! FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== comparison.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running comparison.nc... String: abc Length: 3 0 < 3: true 1 < 3: true 2 < 3: true 3 < 3: false (CORRECT) FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== compound.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running compound.nc... Numerator: 20, Denominator: 31 Numerator: 40, Denominator: 31 x = 15 x = 12 x = 24 x = 6 x = 2 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== functions_as_values.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running functions_as_values.nc... FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== listdir.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running listdir.nc... === Using io.stat (single file) === README.md: size=786, is_dir=0, mode=420 === Using io.readdir (directory listing) === Found 13 entries: [dir] .github: 4096 bytes [file] Makefile: 5814 bytes [dir] tests: 4096 bytes [dir] target: 4096 bytes [file] .gitignore: 708 bytes [dir] .git: 4096 bytes [file] LICENSE: 11356 bytes [dir] .idea: 4096 bytes [dir] src: 4096 bytes [file] Cargo.lock: 6566 bytes [file] Cargo.toml: 238 bytes [dir] std: 4096 bytes [file] README.md: 786 bytes === Recursive directory listing === [file] Makefile [dir] tests/ [file] variadic_debug.nc [file] testing.test.nc [file] scope_leak_if.fail.nc [file] struct.nc [file] struct_array.nc [file] panic.fail.run.nc [file] functions_as_values.nc [file] variadic_iter.nc [file] async.nc [file] variadic.nc [file] builtins_combined.nc [file] type_casts.nc [file] simple_slice.nc [file] listdir.nc [file] scope_leak.fail.nc [file] variadic_simple.nc [file] comparison.nc [file] type_alias.nc [file] str.nc [file] loops.nc [file] tuples_comprehensive.nc [file] array_simple.nc [file] type_alias_func.nc [file] async_type_mismatch.fail.nc [file] new.nc [file] assert.nc [file] loop_scope.nc [file] shadowing.nc [file] type_alias_nested.nc [file] array_range.nc [file] async_await.fail.nc [file] operators.nc [file] time_now.nc [file] compound.nc [file] async_error_handling.nc [file] time_sleep.nc [file] .gitignore [file] LICENSE [dir] src/ [file] lib.rs [dir] compiler/ [dir] passes/ [file] mod.rs [file] optimizations.rs [dir] syntax/ [file] ast.rs [file] mod.rs [file] lexer.rs [file] parser.rs [file] ast_printer.rs [dir] source/ [file] mod.rs [file] driver.rs [file] mod.rs [dir] hir/ [file] mod.rs [dir] backend/ [file] mod.rs [file] asm.rs [dir] diagnostics/ [file] mod.rs [dir] ir/ [file] mod.rs [file] cli.rs [file] main.rs [file] Cargo.lock [file] Cargo.toml [dir] std/ [file] os.nc [file] math.nc [file] io.nc [file] time.nc [file] README.md FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== loop_scope.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running loop_scope.nc... n: 0 1 n: 1 2 n: 2 3 x: 2 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== loops.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running loops.nc... a = 0 a = 1 a = 2 a = 3 a = 4 a = 5 a = 6 a = 7 a = 8 a = 9 b = 2 b = 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 3 5 7 9 11 13 15 17 19 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== new.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running new.nc... new(int) = 0 new(bool) = 0 new(str) = "" new(int) again = 0 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== operators.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running operators.nc... === Arithmetic Operators === a = 10, b = 3 a + b = 13 a - b = 7 a * b = 30 a / b = 3 a % b = 1 a ** b = 1000 === Comparison Operators === a == b: 0 a != b: 1 a < b: 0 a > b: 1 a <= b: 0 a >= b: 1 === Logical Operators === x = 1, y = 0 x and y: 0 x or y: 1 not x: 0 not y: 1 === Bitwise Operators === c = 5, d = 3 c << 1 = 10 c >> 1 = 2 c & d = 1 c | d = 7 c ^ d = 6 !c = -6 === Concatenation Operator === s1 <> s2 <> s3 = Hello World arr1 <> arr2: concatenated (array length: 771) === Unary Operators === e = 42 -e = -42 !e = -43 f = 1 not f = 0 === Operator Precedence === 2 + 3 * 4 = 14 true and false or true = 1 1 + 2 << 1 = 6 === All tests completed === FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== panic.fail.run.nc ==================== Expected: PASS check, FAIL run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running panic.fail.run.nc... Test panic messageFINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED (runtime error as expected) ==================== scope_leak.fail.nc ==================== Expected: FAIL check (legacy) Error: undefined variable 'n' --> tests/scope_leak.fail.nc:7:13 | 7 | int x = n | ^ | here Error: compilation halted: 1 errors emitted FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED (error as expected) ==================== scope_leak_if.fail.nc ==================== Expected: FAIL check (legacy) Error: undefined variable 'y' --> tests/scope_leak_if.fail.nc:5:13 | 5 | int z = y | ^ | here Error: compilation halted: 1 errors emitted FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED (error as expected) ==================== shadowing.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running shadowing.nc... 1 hello 1 hello FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== simple_slice.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running simple_slice.nc... Array: [1, 2, 3, 4, 5] nums[1:3]: [2, 3, 4] FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== str.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running str.nc... 0:c 1:o 2:o 3:k 4:i 5:e 6: 7:🍪 0:c 1:o 2:o 3:k 4:i 5:e 6: 7:🍪 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== struct_array.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running struct_array.nc... Person created: Alice, 30 Array created Index: 0 Name: Alice, Age: 30 Index: 1 Name: Bob, Age: 25 Done FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== struct.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running struct.nc... Name: Alice, Age: 30 name Alice age 30 Numerator: 11, Denominator: 32 Numerator: 20, Denominator: 62 Numerator: 40, Denominator: 62 Name: Bob, Age: 25 name Bob age 25 Name: Alice, Age: 30 name Alice age 30 Name: Charlie, Age: 35 name Charlie age 35 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== testing.test.nc ==================== Expected: PASS check and test FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Testing testing.test.nc... Test results: 1 passed, 0 failed FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== time_now.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running time_now.nc... Current timestamp: 1764386923 Timestamp after 1s: 1764386924 FINISHED CPU 0.01 MEM 7616 MAXMEM 7616 STALE 1 MAXMEM_RSS 5316 Result: ✅ PASSED ==================== time_sleep.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running time_sleep.nc... Start End FINISHED CPU 0.01 MEM 7608 MAXMEM 7608 STALE 2 MAXMEM_RSS 5172 Result: ✅ PASSED ==================== tuples_comprehensive.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running tuples_comprehensive.nc... --- Basic Tuple --- t1[0]: 1 t1[1]: Hi --- Optional Tuple --- result[0] is set result[1] is none --- Return Tuple --- vals: 6, -2 --- Indexing --- vals[0]: 1 vals[1]: hi vals[2]: 2 --- Destructuring --- a: 1, b: 2 x: 10, y: Test FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== type_alias_func.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running type_alias_func.nc... ID: 123, Name: Alice FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== type_alias.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running type_alias.nc... Type alias test passed! FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== type_alias_nested.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running type_alias_nested.nc... x = 42 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== type_casts.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running type_casts.nc... int("123") = 123 str(456) = 456 bool(0) = 0 bool(1) = 1 bool(42) = 1 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== variadic_debug.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running variadic_debug.nc... Starting sum About to iterate In loop, index: 0 Adding: 1 In loop, index: 1 Adding: 2 In loop, index: 2 Adding: 3 Final total: 6 Result: 6 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== variadic_iter.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running variadic_iter.nc... Starting sum Adding: 1 Adding: 2 Adding: 3 Final total: 6 Result: 6 FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== variadic.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running variadic.nc... Sum1 (10): 10 Sum2 (10+5): 15 Sum3 (10+5+10+20): 45 Hello World! No Newline FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== variadic_simple.nc ==================== Expected: PASS check and run FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Running variadic_simple.nc... Got args Done FINISHED CPU 0.00 MEM 0 MAXMEM -1 STALE 0 MAXMEM_RSS -1 Result: ✅ PASSED ==================== Summary ==================== Results: 36 passed, 0 failed ~/git/nc mast