make more tests green
This commit is contained in:
parent
22de45ef69
commit
009fcc9f84
2 changed files with 1 additions and 7 deletions
|
|
@ -2,21 +2,15 @@ discard """
|
||||||
file: "tfloatnan.nim"
|
file: "tfloatnan.nim"
|
||||||
output: '''Nim: nan
|
output: '''Nim: nan
|
||||||
Nim: nan (float)
|
Nim: nan (float)
|
||||||
C: nan (float)
|
|
||||||
Nim: nan (double)
|
Nim: nan (double)
|
||||||
C: nan (double)
|
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
proc printf(formatstr: cstring): int {.importc: "printf", varargs, header: "<stdio.h>".}
|
|
||||||
|
|
||||||
let f = NaN
|
let f = NaN
|
||||||
echo "Nim: ", f
|
echo "Nim: ", f
|
||||||
|
|
||||||
let f32: float32 = NaN
|
let f32: float32 = NaN
|
||||||
echo "Nim: ", f32, " (float)"
|
echo "Nim: ", f32, " (float)"
|
||||||
discard printf("C: %f (float)\n", f32)
|
|
||||||
|
|
||||||
let f64: float64 = NaN
|
let f64: float64 = NaN
|
||||||
echo "Nim: ", f64, " (double)"
|
echo "Nim: ", f64, " (double)"
|
||||||
discard printf("C: %lf (double)\n", f64)
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ discard """
|
||||||
23'''
|
23'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
proc toIter*[T](s: Slice[T, T]): iterator: T =
|
proc toIter*[T](s: Slice[T]): iterator: T =
|
||||||
iterator it: T {.closure.} =
|
iterator it: T {.closure.} =
|
||||||
for x in s.a..s.b:
|
for x in s.a..s.b:
|
||||||
yield x
|
yield x
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue