authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-08-04 20:27:46+02:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-08-04 20:27:46+02:00
logcbac7a019473055aaf6b1a87b4b57b9872ed54b4
treeec9afd76406530cd75e911cbd29fe1c9c056f804
parentfb0b9f05b3dbf394f92fac7c36189f054fc68b41

init-exe template: small improvements


1 files changed, 2 insertions(+), 2 deletions(-)

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