mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
17 lines
264 B
Zig
17 lines
264 B
Zig
var y: i32 = add(10, x);
|
|
const x: i32 = add(12, 34);
|
|
|
|
test "container level variables" {
|
|
try expect(x == 46);
|
|
try expect(y == 56);
|
|
}
|
|
|
|
fn add(a: i32, b: i32) i32 {
|
|
return a + b;
|
|
}
|
|
|
|
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
// test
|