diff options
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index e4b42b12a4..c78d17a916 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1931,4 +1931,18 @@ pub fn addCases(cases: &tests.CompileErrorContext) { \\} , ".tmp_source.zig:1:13: error: struct 'Foo' contains itself"); + + cases.add("float literal too large error", + \\comptime { + \\ const a = 0x1.0p1024; + \\} + , + ".tmp_source.zig:2:15: error: float literal out of range of any type"); + + cases.add("float literal too small error (denormal)", + \\comptime { + \\ const a = 0x1.0p-1023; + \\} + , + ".tmp_source.zig:2:15: error: float literal out of range of any type"); } |
