require errormsg to be specified before file.

This commit is contained in:
Arne Döring 2018-11-29 16:07:51 +01:00 • committed by Araq
commit 1105d03644
264 changed files with 305 additions and 623 deletions

View file

@ -1,5 +1,4 @@
discard """
file: "tfloat1.nim"
outputsub: "Error: unhandled exception: FPU operation caused an overflow [FloatOverflowError]"
exitcode: "1"
"""
@ -11,5 +10,3 @@ var x = 0.8
var y = 0.0
echo x / y #OUT Error: unhandled exception: FPU operation caused an overflow

View file

@ -1,5 +1,4 @@
discard """
file: "tfloat2.nim"
outputsub: "Error: unhandled exception: FPU operation caused a NaN result [FloatInvalidOpError]"
exitcode: "1"
"""
@ -11,5 +10,3 @@ var x = 0.0
var y = 0.0
echo x / y #OUT Error: unhandled exception: FPU operation caused a NaN result

View file

@ -1,5 +1,4 @@
discard """
file: "tfloat3.nim"
output: "Nim 3.4368930843, 0.3299290698 C double: 3.4368930843, 0.3299290698"
"""
@ -19,6 +18,3 @@ proc printFloats {.importc, nodecl.}
var x: float = 1.234567890123456789
c_printf("Nim %.10f, %.10f ", exp(x), cos(x))
printFloats()

View file

@ -1,8 +1,7 @@
discard """
file: "tfloat4.nim"
output: "passed all tests."
exitcode: 0
"""
import math, strutils
proc c_sprintf(buf, fmt: cstring) {.importc:"sprintf", header: "<stdio.h>", varargs.}

View file

@ -1,9 +1,10 @@
discard """
file: "tfloat5.nim"
output: '''0 : 0.0
output: '''
0 : 0.0
0 : 0.0
0 : 0.0'''
0 : 0.0
0 : 0.0
'''
"""
import parseutils

View file

@ -1,12 +1,13 @@
discard """
file: "tfloat6.nim"
output: '''1e-06 : 1e-06
output: '''
1e-06 : 1e-06
1e-06 : 1e-06
0.001 : 0.001
1e-06 : 1e-06
1e-06 : 1e-06
10.000001 : 10.000001
100.000001 : 100.000001'''
100.000001 : 100.000001
'''
disabled: "windows"
"""

View file

@ -1,12 +1,13 @@
discard """
file: "tfloat6.nim"
output: '''passed.
output: '''
passed.
passed.
passed.
passed.
passed.
passed.'''
passed.
passed.
'''
"""
import strutils

View file

@ -1,6 +1,6 @@
discard """
file: "tfloatnan.nim"
output: '''Nim: nan
output: '''
Nim: nan
Nim: nan (float)
Nim: nan (double)
'''

View file

@ -1,7 +1,7 @@
discard """
file: "tissue5821.nim"
output: ''''''
output: "ok"
"""
proc main(): void =
let a: float32 = 47.11'f32
doAssert a == 47.11'f32
@ -10,4 +10,6 @@ proc main(): void =
doAssert b != 10.123402823e+38'f64
doAssert b == 10.234402823e+38'f64
main()
echo "ok"
main()