diff options
author | Oscar NihlgÄrd <oscarnihlgard@gmail.com> | 2019-05-06 21:19:40 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-05-06 21:19:40 +0200 |
commit | 4c6fc173b772a4c93d82e9d544a0d5a1fe270eea (patch) | |
tree | eb98ab71d1b450746e695236b40ed5e3241e92f2 /tests/misc | |
parent | b1091f85d4d363f4368b65c54b898e83bec459e1 (diff) | |
download | Nim-4c6fc173b772a4c93d82e9d544a0d5a1fe270eea.tar.gz |
low/high for float ranges (#11177)
Diffstat (limited to 'tests/misc')
-rw-r--r-- | tests/misc/tlowhigh.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/misc/tlowhigh.nim b/tests/misc/tlowhigh.nim new file mode 100644 index 000000000..61a7bfaed --- /dev/null +++ b/tests/misc/tlowhigh.nim @@ -0,0 +1,14 @@ +discard """ + action: run +""" + +var x: range[-1'f32..1'f32] +doAssert x.low == -1'f32 +doAssert x.high == 1'f32 +doAssert x.type.low == -1'f32 +doAssert x.type.high == 1'f32 +var y: range[-1'f64..1'f64] +doAssert y.low == -1'f64 +doAssert y.high == 1'f64 +doAssert y.type.low == -1'f64 +doAssert y.type.high == 1'f64 \ No newline at end of file |