diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-01-05 00:34:15 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-01-05 00:34:15 +0100 |
commit | a8303679960a13aa9ddd1f2fa44c2e4f9a12f071 (patch) | |
tree | 69cc1b3d8c501eb3d7fddaffe3d0e4e06bd5c82e /tests | |
parent | a58a2f3823c33104992dc0e4129fa53e66a18f44 (diff) | |
download | Nim-a8303679960a13aa9ddd1f2fa44c2e4f9a12f071.tar.gz |
further development of httpserver
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tfinally.nim | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/tmatrix.nim | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/tfinally.nim b/tests/tfinally.nim index 102444e82..df6397125 100755 --- a/tests/tfinally.nim +++ b/tests/tfinally.nim @@ -6,5 +6,5 @@ proc main: int = finally: echo "came here" -echo main() +discard main() #OUT came here diff --git a/tests/tmatrix.nim b/tests/tmatrix.nim index a64ac0395..a162d0f10 100644..100755 --- a/tests/tmatrix.nim +++ b/tests/tmatrix.nim @@ -21,18 +21,18 @@ proc `[,]`*(m: TMatrix, x, y: int): float {.inline.} = proc `[,]=`*(m: var TMatrix, x, y: int, val: float) {.inline.} = m.data[x|y] = val -proc `[$..$, $..$]`*(m: TMatrix, a, b, c, d: int): TMatrix = +proc `[$ .. $, $ .. $]`*(m: TMatrix, a, b, c, d: int): TMatrix = result = createMatrix(b-a+1, d-c+1) for x in a..b: for y in c..d: result[x-a, y-c] = m[x, y] -proc `[$..$, $..$]=`*(m: var TMatrix, a, b, c, d: int, val: float) = +proc `[$ .. $, $ .. $]=`*(m: var TMatrix, a, b, c, d: int, val: float) = for x in a..b: for y in c..d: m[x, y] = val -proc `[$..$, $..$]=`*(m: var TMatrix, a, b, c, d: int, val: TMatrix) = +proc `[$ .. $, $ .. $]=`*(m: var TMatrix, a, b, c, d: int, val: TMatrix) = assert val.width == b-a+1 assert val.height == d-c+1 for x in a..b: @@ -57,4 +57,4 @@ for i in 0..w-1: m[i, i] = 1.0 for i in 0..w-1: - stdout.write(m[i,i]) #OUT 1.01.01.0 + stdout.write(m[i,i]) #OUT 111 |