test_container_level_variables.zig (264B) - Raw
1 var y: i32 = add(10, x); 2 const x: i32 = add(12, 34); 3 4 test "container level variables" { 5 try expect(x == 46); 6 try expect(y == 56); 7 } 8 9 fn add(a: i32, b: i32) i32 { 10 return a + b; 11 } 12 13 const std = @import("std"); 14 const expect = std.testing.expect; 15 16 // test