diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-12-07 21:35:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-07 21:35:02 -0500 |
| commit | d69e97ae1677ca487833caf6937fa428563ed0ae (patch) | |
| tree | 9299ebd6762715fd756972458f152ed123bf718f /test/behavior/maximum_minimum.zig | |
| parent | 913b4a3f19955296a892ffe4f148f8c097a7732a (diff) | |
| parent | 6039554b26b1aee6502063d9130907369c4ffd38 (diff) | |
| download | zig-d69e97ae1677ca487833caf6937fa428563ed0ae.tar.gz zig-d69e97ae1677ca487833caf6937fa428563ed0ae.zip | |
Merge pull request #13806 from Vexu/stage2-fixes
misc fixes and improvements
Diffstat (limited to 'test/behavior/maximum_minimum.zig')
| -rw-r--r-- | test/behavior/maximum_minimum.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/behavior/maximum_minimum.zig b/test/behavior/maximum_minimum.zig index 977d06204e..79ec5f14fa 100644 --- a/test/behavior/maximum_minimum.zig +++ b/test/behavior/maximum_minimum.zig @@ -95,3 +95,10 @@ test "@min for vectors" { try S.doTheTest(); comptime try S.doTheTest(); } + +test "@min/@max on lazy values" { + const A = extern struct { u8_4: [4]u8 }; + const B = extern struct { u8_16: [16]u8 }; + const size = @max(@sizeOf(A), @sizeOf(B)); + try expect(size == @sizeOf(B)); +} |
