diff options
| author | Robin Voetter <robin@voetter.nl> | 2022-01-03 02:04:20 +0100 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2022-01-03 02:09:54 +0100 |
| commit | 67449b659dc752b6cc6d9359637af687a4618609 (patch) | |
| tree | 8b69d615d0c9172ccce051c8b87e73deddf1c845 /test/behavior/type.zig | |
| parent | 7f77d3d671dbfec11592d28cd51454aeefd07930 (diff) | |
| download | zig-67449b659dc752b6cc6d9359637af687a4618609.tar.gz zig-67449b659dc752b6cc6d9359637af687a4618609.zip | |
stage2: move some more tests
Diffstat (limited to 'test/behavior/type.zig')
| -rw-r--r-- | test/behavior/type.zig | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/behavior/type.zig b/test/behavior/type.zig index 1430a153e9..cb72f86b8b 100644 --- a/test/behavior/type.zig +++ b/test/behavior/type.zig @@ -57,3 +57,48 @@ test "Type.EnumLiteral" { @TypeOf(.Dummy), }); } + +test "Type.Pointer" { + try testTypes(&[_]type{ + // One Value Pointer Types + *u8, *const u8, + *volatile u8, *const volatile u8, + *align(4) u8, *align(4) const u8, + *align(4) volatile u8, *align(4) const volatile u8, + *align(8) u8, *align(8) const u8, + *align(8) volatile u8, *align(8) const volatile u8, + *allowzero u8, *allowzero const u8, + *allowzero volatile u8, *allowzero const volatile u8, + *allowzero align(4) u8, *allowzero align(4) const u8, + *allowzero align(4) volatile u8, *allowzero align(4) const volatile u8, + // Many Values Pointer Types + [*]u8, [*]const u8, + [*]volatile u8, [*]const volatile u8, + [*]align(4) u8, [*]align(4) const u8, + [*]align(4) volatile u8, [*]align(4) const volatile u8, + [*]align(8) u8, [*]align(8) const u8, + [*]align(8) volatile u8, [*]align(8) const volatile u8, + [*]allowzero u8, [*]allowzero const u8, + [*]allowzero volatile u8, [*]allowzero const volatile u8, + [*]allowzero align(4) u8, [*]allowzero align(4) const u8, + [*]allowzero align(4) volatile u8, [*]allowzero align(4) const volatile u8, + // Slice Types + []u8, []const u8, + []volatile u8, []const volatile u8, + []align(4) u8, []align(4) const u8, + []align(4) volatile u8, []align(4) const volatile u8, + []align(8) u8, []align(8) const u8, + []align(8) volatile u8, []align(8) const volatile u8, + []allowzero u8, []allowzero const u8, + []allowzero volatile u8, []allowzero const volatile u8, + []allowzero align(4) u8, []allowzero align(4) const u8, + []allowzero align(4) volatile u8, []allowzero align(4) const volatile u8, + // C Pointer Types + [*c]u8, [*c]const u8, + [*c]volatile u8, [*c]const volatile u8, + [*c]align(4) u8, [*c]align(4) const u8, + [*c]align(4) volatile u8, [*c]align(4) const volatile u8, + [*c]align(8) u8, [*c]align(8) const u8, + [*c]align(8) volatile u8, [*c]align(8) const volatile u8, + }); +} |
