mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 00:44:32 +01:00
16 lines
280 B
Zig
16 lines
280 B
Zig
var y: i32 = add(10, x);
|
|
const x: i32 = add(12, 34);
|
|
|
|
test "container level variables" {
|
|
try expectEqual(46, x);
|
|
try expectEqual(56, y);
|
|
}
|
|
|
|
fn add(a: i32, b: i32) i32 {
|
|
return a + b;
|
|
}
|
|
|
|
const std = @import("std");
|
|
const expectEqual = std.testing.expectEqual;
|
|
|
|
// test
|