diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-08-26 13:29:24 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-08-26 13:29:24 -0400 |
| commit | e726925e802eddab53cbfd9aacbc5eefe95c356f (patch) | |
| tree | dd32cbabb1e04929090761bb1129c8b27ee38ce1 /test | |
| parent | 3a4ea41fe891b5b0b9b50cb80200a392e20cc31f (diff) | |
| download | zig-e726925e802eddab53cbfd9aacbc5eefe95c356f.tar.gz zig-e726925e802eddab53cbfd9aacbc5eefe95c356f.zip | |
remove @alignOf and add @cAbiAlignOf and @preferredAlignOf
See #396
Diffstat (limited to 'test')
| -rw-r--r-- | test/cases/alignof.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/cases/alignof.zig b/test/cases/alignof.zig index 27b95c7fdc..97f8efe503 100644 --- a/test/cases/alignof.zig +++ b/test/cases/alignof.zig @@ -3,9 +3,12 @@ const builtin = @import("builtin"); const Foo = struct { x: u32, y: u32, z: u32, }; -test "@alignOf(T) before referencing T" { - comptime assert(@alignOf(Foo) != @maxValue(usize)); +test "@abiAlignOf(T) before referencing T" { + comptime assert(@cAbiAlignOf(Foo) != @maxValue(usize)); if (builtin.arch == builtin.Arch.x86_64) { - comptime assert(@alignOf(Foo) == 4); + comptime { + assert(@cAbiAlignOf(Foo) == 4); + assert(@preferredAlignOf(Foo) == 8); + } } } |
