16 lines
325 B
Zig
16 lines
325 B
Zig
const std = @import("std");
|
|
const print = std.debug.print;
|
|
|
|
// $ zig run hello-world.zig
|
|
pub fn main() void {
|
|
print("Hello, {s}!\n", .{"World"});
|
|
}
|
|
|
|
pub fn test_hello_world() []const u8 {
|
|
return "Hello, Test!\n";
|
|
}
|
|
|
|
test "hello-world" {
|
|
try std.testing.expectEqualStrings(test_hello_world(), "Hello, Test!\n");
|
|
}
|