aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/this.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-02-22 14:15:09 +0100
committerJakub Konka <kubkon@jakubkonka.com>2022-02-22 21:57:42 +0100
commit25e4b16e25502ca5e76e4049ed9f727168782dde (patch)
tree947799ee1d22e621937c95842370cc7aee679412 /test/behavior/this.zig
parenta94267b2906e90aadf397b3f524e1069721fb496 (diff)
downloadzig-25e4b16e25502ca5e76e4049ed9f727168782dde.tar.gz
zig-25e4b16e25502ca5e76e4049ed9f727168782dde.zip
Port more behavior tests
Diffstat (limited to 'test/behavior/this.zig')
-rw-r--r--test/behavior/this.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/behavior/this.zig b/test/behavior/this.zig
index 0fcfd5910c..49b7ca69d9 100644
--- a/test/behavior/this.zig
+++ b/test/behavior/this.zig
@@ -1,4 +1,5 @@
const expect = @import("std").testing.expect;
+const builtin = @import("builtin");
const module = @This();
@@ -20,10 +21,16 @@ fn add(x: i32, y: i32) i32 {
}
test "this refer to module call private fn" {
+ if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
+ if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
+
try expect(module.add(1, 2) == 3);
}
test "this refer to container" {
+ if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
+ if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
+
var pt: Point(i32) = undefined;
pt.x = 12;
pt.y = 34;