low/high for float ranges (#11177)
This commit is contained in:
parent
b1091f85d4
commit
4c6fc173b7
4 changed files with 27 additions and 7 deletions
14
tests/misc/tlowhigh.nim
Normal file
14
tests/misc/tlowhigh.nim
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue