megatest: make it green on Linux
This commit is contained in:
parent
916955dc95
commit
34815a4697
6 changed files with 9 additions and 9 deletions
|
|
@ -8,20 +8,21 @@ true
|
|||
false
|
||||
true
|
||||
'''
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
block tlowhigh:
|
||||
type myEnum = enum e1, e2, e3, e4, e5
|
||||
var a: array[myEnum, int]
|
||||
|
||||
|
||||
for i in low(a) .. high(a):
|
||||
a[i] = 0
|
||||
|
||||
|
||||
proc sum(a: openarray[int]): int =
|
||||
result = 0
|
||||
for i in low(a)..high(a):
|
||||
inc(result, a[i])
|
||||
|
||||
|
||||
doAssert sum([1, 2, 3, 4]) == 10
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue