summaryrefslogtreecommitdiff
path: root/tests/test.zig
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.zig')
-rw-r--r--tests/test.zig28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test.zig b/tests/test.zig
new file mode 100644
index 0000000..b448aef
--- /dev/null
+++ b/tests/test.zig
@@ -0,0 +1,28 @@
+const std = @import("std");
+
+pub fn main() !void {
+ std.debug.print("Hello, world!\n", .{});
+}
+
+pub fn add(a: i32, b: i32) i32 {
+ return a + b;
+}
+
+const Point = struct {
+ x: f32,
+ y: f32,
+
+ pub fn init(x: f32, y: f32) Point {
+ return Point{ .x = x, .y = y };
+ }
+};
+
+const Color = enum {
+ Red,
+ Green,
+ Blue,
+};
+
+const MyError = error{
+ BadStuff,
+};