aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJonathan Marler <jonathan.j.marler@hp.com>2019-09-04 11:08:49 -0600
committerAndrew Kelley <andrew@ziglang.org>2019-09-05 13:08:45 -0400
commit9a358d2d33b0ecdec38ba3698acf8b239c43b667 (patch)
tree8174259bea6cfe1b82ada4e8808f23403f73a073 /test
parent847a262efdf5f3a359b00f13c101236dc0747f1b (diff)
downloadzig-9a358d2d33b0ecdec38ba3698acf8b239c43b667.tar.gz
zig-9a358d2d33b0ecdec38ba3698acf8b239c43b667.zip
Add Array support to @Type
Diffstat (limited to 'test')
-rw-r--r--test/stage1/behavior/type.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/stage1/behavior/type.zig b/test/stage1/behavior/type.zig
index 5b2998f088..b84369a164 100644
--- a/test/stage1/behavior/type.zig
+++ b/test/stage1/behavior/type.zig
@@ -93,6 +93,12 @@ test "Type.Pointer" {
});
}
+test "Type.Array" {
+ testing.expect([123]u8 == @Type(TypeInfo { .Array = TypeInfo.Array { .len = 123, .child = u8 } }));
+ testing.expect([2]u32 == @Type(TypeInfo { .Array = TypeInfo.Array { .len = 2, .child = u32 } }));
+ testTypes([_]type {[1]u8, [30]usize, [7]bool});
+}
+
test "Type.ComptimeFloat" {
testTypes([_]type {comptime_float});
}