diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-11-04 16:04:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-04 16:04:31 +0200 |
| commit | 8c4faa5f3f63cfbcfdc12cda7c37be1da642d2f6 (patch) | |
| tree | 2a90fb00f39cb5eae5f8083e2b8462a2e198f918 /test/behavior | |
| parent | ea54c9a375ef8f419694b39b9f14f181fa0b82ee (diff) | |
| parent | 577daab08cd2119604b5ee501e4bd8aeb2619668 (diff) | |
| download | zig-8c4faa5f3f63cfbcfdc12cda7c37be1da642d2f6.tar.gz zig-8c4faa5f3f63cfbcfdc12cda7c37be1da642d2f6.zip | |
Merge pull request #13338 from Vexu/stage2-compile-errors
Improve some error messages
Diffstat (limited to 'test/behavior')
| -rw-r--r-- | test/behavior/cast.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/behavior/cast.zig b/test/behavior/cast.zig index 573f3a7ac2..07d45ad3dc 100644 --- a/test/behavior/cast.zig +++ b/test/behavior/cast.zig @@ -1411,3 +1411,11 @@ test "peer type resolution of const and non-const pointer to array" { try std.testing.expect(@TypeOf(a, b) == *const [1024]u8); try std.testing.expect(a == b); } + +test "floatToInt to zero-bit int" { + if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO + + var a: f32 = 0.0; + comptime try std.testing.expect(@floatToInt(u0, a) == 0); +} |
