From 286e5958d662038fdc852861ecd07c89256495ab Mon Sep 17 00:00:00 2001 From: PhiLho Date: Fri, 21 May 2010 16:03:21 +0200 Subject: Integrating my changes, mostly minor/cosmetic fixes; plus a big Windows lib update --- tests/accept/run/minit.nim | 2 +- tests/accept/run/tbintre2.nim | 4 ++-- tests/accept/run/tbintree.nim | 14 +++++++------- tests/accept/run/tinit.nim | 4 ++-- tests/accept/run/toverwr.nim | 4 ++-- tests/accept/run/tpos.nim | 4 ++-- tests/accept/run/tsimmeth.nim | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) (limited to 'tests/accept/run') diff --git a/tests/accept/run/minit.nim b/tests/accept/run/minit.nim index d3b4b0be1..75fcebb77 100755 --- a/tests/accept/run/minit.nim +++ b/tests/accept/run/minit.nim @@ -1,2 +1,2 @@ # Test the new initialization for modules -write(stdout, "Hallo from module! ") +write(stdout, "Hello from module! ") diff --git a/tests/accept/run/tbintre2.nim b/tests/accept/run/tbintre2.nim index dedc87705..e85837dfa 100755 --- a/tests/accept/run/tbintre2.nim +++ b/tests/accept/run/tbintre2.nim @@ -4,7 +4,7 @@ import tbintree var root: PBinaryTree[string] - x = newNode("hallo") + x = newNode("hello") add(root, x) add(root, "world") if find(root, "world"): @@ -21,5 +21,5 @@ add(r2, 99) for y in items(r2): stdout.write(y) -#OUT halloworld99110223 +#OUT helloworld99110223 diff --git a/tests/accept/run/tbintree.nim b/tests/accept/run/tbintree.nim index 89126eaa5..0561e004a 100755 --- a/tests/accept/run/tbintree.nim +++ b/tests/accept/run/tbintree.nim @@ -35,12 +35,12 @@ proc add*[Ty](root: var PBinaryTree[Ty], data: Ty) = # convenience proc: add(root, newNode(data)) -proc find*[Ty2](b: PBinaryTree[Ty2], data: Ty2): bool = +proc find*[Ty2](b: PBinaryTree[Ty2], data: Ty2): bool = # for testing this needs to be recursive, so that the # instantiated type is checked for proper tyGenericInst envelopes - if b == nil: + if b == nil: result = false - else: + else: var c = cmp(data, b.data) if c < 0: result = find(b.le, data) elif c > 0: result = find(b.ri, data) @@ -66,7 +66,7 @@ iterator items*[T](root: PBinaryTree[T]): T = while n != nil: add(stack, n) n = n.le - if stack.len > 0: + if stack.len > 0: n = stack.pop() yield n.data n = n.ri @@ -81,7 +81,7 @@ proc debug[T](a: PBinaryTree[T]) = when isMainModule: var root: PBinaryTree[string] - x = newNode("hallo") + x = newNode("hello") add(root, x) add(root, "world") if find(root, "world"): @@ -89,7 +89,7 @@ when isMainModule: stdout.write(str) else: stdout.writeln("BUG") - + var r2: PBinaryTree[int] add(r2, newNode(110)) @@ -98,4 +98,4 @@ when isMainModule: for y in items(r2): stdout.write(y) -#OUT halloworld99110223 +#OUT helloworld99110223 diff --git a/tests/accept/run/tinit.nim b/tests/accept/run/tinit.nim index 85475ce94..386bfec37 100755 --- a/tests/accept/run/tinit.nim +++ b/tests/accept/run/tinit.nim @@ -2,5 +2,5 @@ import minit -write(stdout, "Hallo from main module!\n") -#OUT Hallo from module! Hallo from main module! +write(stdout, "Hello from main module!\n") +#OUT Hello from module! Hello from main module! diff --git a/tests/accept/run/toverwr.nim b/tests/accept/run/toverwr.nim index f2b42df15..6705c6b3f 100755 --- a/tests/accept/run/toverwr.nim +++ b/tests/accept/run/toverwr.nim @@ -3,5 +3,5 @@ proc write(t: TFile, s: string) = nil # a nop -system.write(stdout, "hallo") -#OUT hallo +system.write(stdout, "hello") +#OUT hello diff --git a/tests/accept/run/tpos.nim b/tests/accept/run/tpos.nim index 114d39c05..df701d3c5 100755 --- a/tests/accept/run/tpos.nim +++ b/tests/accept/run/tpos.nim @@ -23,7 +23,7 @@ proc mypos(sub, s: string, start: int = 0): int = else: result = -1 -var sub = "hallo" -var s = "world hallo" +var sub = "hello" +var s = "world hello" write(stdout, mypos(sub, s)) #OUT 6 diff --git a/tests/accept/run/tsimmeth.nim b/tests/accept/run/tsimmeth.nim index 3f5f810e6..c6dbf69bb 100755 --- a/tests/accept/run/tsimmeth.nim +++ b/tests/accept/run/tsimmeth.nim @@ -2,7 +2,7 @@ import strutils -var x = "hallo world!".toLower.toUpper +var x = "hello world!".toLower.toUpper x.echo() -#OUT HALLO WORLD! +#OUT HELLO WORLD! -- cgit 1.4.1-2-gfad0