-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
- Loading branch information
Showing
3 changed files
with
6 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1 @@ | ||
const std = @import("std"); | ||
|
||
pub fn main() !void { | ||
// Prints to stderr (it's a shortcut based on `std.io.getStdErr()`) | ||
std.debug.print("All your {s} are belong to us.\n", .{"codebase"}); | ||
|
||
// stdout is for the actual output of your application, for example if you | ||
// are implementing gzip, then only the compressed bytes should be sent to | ||
// stdout, not any debugging messages. | ||
const stdout_file = std.io.getStdOut().writer(); | ||
var bw = std.io.bufferedWriter(stdout_file); | ||
const stdout = bw.writer(); | ||
|
||
try stdout.print("Run `zig build test` to run the tests.\n", .{}); | ||
|
||
try bw.flush(); // don't forget to flush! | ||
} | ||
|
||
test "simple test" { | ||
var list = std.ArrayList(i32).init(std.testing.allocator); | ||
defer list.deinit(); // try commenting this out and see if zig detects the memory leak! | ||
try list.append(42); | ||
try std.testing.expectEqual(@as(i32, 42), list.pop()); | ||
} | ||
pub fn main() !void {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
const std = @import("std"); | ||
const testing = std.testing; | ||
pub const eip5564 = @import("eip5564.zig"); | ||
|
||
test "stealth address" { | ||
_ = @import("stealth_address.zig"); | ||
_ = @import("eip5564.zig"); | ||
} |