1 //! By convention, root.zig is the root source file when making a library.
2 const std = @import("std");
4 pub fn bufferedPrint() !void {
5 // Stdout is for the actual output of your application, for example if you
6 // are implementing gzip, then only the compressed bytes should be sent to
7 // stdout, not any debugging messages.
8 var stdout_buffer: [1024]u8 = undefined;
9 var stdout_writer = std.fs.File.stdout().writer(&stdout_buffer);
10 const stdout = &stdout_writer.interface;
12 try stdout.print("Run `zig build test` to run the tests.\n", .{});
14 try stdout.flush(); // Don't forget to flush!
17 pub fn add(a: i32, b: i32) i32 {
21 test "basic add functionality" {
22 try std.testing.expect(add(3, 7) == 10);