got rid of 'accept' dir in the tests

This commit is contained in:
Araq
2011-11-19 15:45:51 +01:00
parent d0772feb08
commit a274f3bf5b
264 changed files with 5 additions and 7 deletions

24
tests/run/tarray2.nim Executable file
View File

@@ -0,0 +1,24 @@
discard """
file: "tarray2.nim"
output: "[16, 25, 36]"
"""
# simple check for one dimensional arrays
type
TMyArray = array[0..2, int]
proc mul(a, b: TMyarray): TMyArray =
result = a
for i in 0..len(a)-1:
result[i] = a[i] * b[i]
var
x, y, z: TMyArray
x = [ 4, 5, 6 ]
y = x
echo repr(mul(x, y))
#OUT [16, 25, 36]