| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | |
| 3 | 3 | pub fn main() !void { |
| 4 | | // Prints to stderr |
| 4 | // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`) |
| 5 | 5 | std.debug.print("All your {s} are belong to us.\n", .{"codebase"}); |
| 6 | 6 | |
| 7 | 7 | // Prints to stdout |
| ... | ... | @@ -18,5 +18,5 @@ test "simple test" { |
| 18 | 18 | var list = std.ArrayList(i32).init(std.testing.allocator); |
| 19 | 19 | defer list.deinit(); // try commenting this out and see if zig detects the memory leak! |
| 20 | 20 | try list.append(42); |
| 21 | | try std.testing.expectEqual(list.pop(), 42); |
| 21 | try std.testing.expectEqual(@as(i32, 42), list.pop()); |
| 22 | 22 | } |