renamed writeln to writeLine in tests
This commit is contained in:
parent
b6252af5c6
commit
69e15ac32f
39 changed files with 456 additions and 456 deletions
|
|
@ -2,20 +2,20 @@ discard """
|
|||
file: "toverflw.nim"
|
||||
output: "the computation overflowed"
|
||||
"""
|
||||
# Tests nim's ability to detect overflows
|
||||
|
||||
{.push overflowChecks: on.}
|
||||
|
||||
var
|
||||
a, b: int
|
||||
a = high(int)
|
||||
b = -2
|
||||
try:
|
||||
writeln(stdout, b - a)
|
||||
except OverflowError:
|
||||
writeln(stdout, "the computation overflowed")
|
||||
|
||||
{.pop.} # overflow check
|
||||
#OUT the computation overflowed
|
||||
# Tests nim's ability to detect overflows
|
||||
|
||||
{.push overflowChecks: on.}
|
||||
|
||||
var
|
||||
a, b: int
|
||||
a = high(int)
|
||||
b = -2
|
||||
try:
|
||||
writeLine(stdout, b - a)
|
||||
except OverflowError:
|
||||
writeLine(stdout, "the computation overflowed")
|
||||
|
||||
{.pop.} # overflow check
|
||||
#OUT the computation overflowed
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue