added more tests and updated the changelog
This commit is contained in:
parent
2396f0ee71
commit
755c4428fe
2 changed files with 17 additions and 0 deletions
|
|
@ -71,6 +71,9 @@ iterator mypairs[T](x: openarray[T]): tuple[idx: int, val: lent T]
|
||||||
|
|
||||||
## Language changes
|
## Language changes
|
||||||
|
|
||||||
|
- `uint64` is now finally a regular ordinal type. This means `high(uint64)` compiles
|
||||||
|
and yields the correct value.
|
||||||
|
|
||||||
|
|
||||||
### Tool changes
|
### Tool changes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
discard """
|
discard """
|
||||||
action: run
|
action: run
|
||||||
|
output: '''
|
||||||
|
18446744073709551615
|
||||||
|
9223372036854775807
|
||||||
|
4294967295
|
||||||
|
0
|
||||||
|
0
|
||||||
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
var x: range[-1'f32..1'f32]
|
var x: range[-1'f32..1'f32]
|
||||||
|
|
@ -16,3 +23,10 @@ doAssert y.type.high == 1'f64
|
||||||
# bug #11972
|
# bug #11972
|
||||||
var num: uint8
|
var num: uint8
|
||||||
doAssert num.high.float == 255.0
|
doAssert num.high.float == 255.0
|
||||||
|
|
||||||
|
echo high(uint64)
|
||||||
|
echo high(int64)
|
||||||
|
echo high(uint32)
|
||||||
|
|
||||||
|
echo low(uint64)
|
||||||
|
echo low(uint32)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue