Skip to content

Commit bfebbb6

Browse files
committed
Fixed more broken tests
1 parent 4dd64b5 commit bfebbb6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
discard """
22
cmd: "nim check $file"
33
"""
4-
# unhandled exception:
54
# high(uint64) + 1
65
discard 18446744073709551616'u64 #[tt.Error
7-
^ unhandled exception: number out of range: 18446744073709551616 [OverflowDefect] ]#
6+
^ number out of range: '18446744073709551616'u64' ]#
87
# high(int64) + 1
98
discard 9223372036854775808'i64 #[tt.Error
10-
^ unhandled exception: number out of range: 9223372036854775808 [OverflowDefect] ]#
9+
^ number out of range: '9223372036854775808'i64' ]#
1110
# high(int64) + 1
1211
discard 9223372036854775808 #[tt.Error
13-
^ unhandled exception: number out of range: 9223372036854775808 [OverflowDefect] ]#
12+
^ number out of range: '9223372036854775808' ]#
1413
discard 300'u8 #[tt.Error
15-
^ unhandled exception: number out of range: 300 [OverflowDefect] ]#
14+
^ number out of range: '300'u8' ]#

tests/views/tdont_mutate.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const
1010
Whitespace = {' ', '\t', '\n', '\r'}
1111

1212
proc split*(s: string, seps: set[char] = Whitespace, maxsplit: int = -1): Table[int, openArray[char]] #[tt.Error
13-
'result' borrows from the immutable location 's' and attempts to mutate it
13+
^ 'result' borrows from the immutable location 's' and attempts to mutate it
1414
]# =
1515
var last = 0
1616
var splits = maxsplit
@@ -35,7 +35,7 @@ proc `$`(x: openArray[char]): string =
3535

3636
proc otherTest(x: int) =
3737
var y: var int = x #[tt.Error
38-
'y' borrows from the immutable location 'x' and attempts to mutate it
38+
^ 'y' borrows from the immutable location 'x' and attempts to mutate it
3939
]#
4040
y = 3
4141

0 commit comments

Comments
 (0)