summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tclosure.nim4
-rwxr-xr-xtests/tconsteval.nim4
-rwxr-xr-xtests/tenuminh.nim10
-rwxr-xr-xtests/thallo.nim6
-rwxr-xr-xtests/titer5.nim2
5 files changed, 12 insertions, 14 deletions
diff --git a/tests/tclosure.nim b/tests/tclosure.nim
index 399f68463..761e9a8f3 100755
--- a/tests/tclosure.nim
+++ b/tests/tclosure.nim
@@ -12,8 +12,8 @@ var
 
 proc testA() =
   var p = 0
-  map(myData, lambda (x: int): int =
-                result = x + 1 shl (lambda (y: int): int =
+  map(myData, proc (x: int): int =
+                result = x + 1 shl (proc (y: int): int =
                   return y + p
                 )(0)
                 inc(p))
diff --git a/tests/tconsteval.nim b/tests/tconsteval.nim
index 2bda0651d..ce90d7c27 100755
--- a/tests/tconsteval.nim
+++ b/tests/tconsteval.nim
@@ -1,3 +1,4 @@
+import strutils
 
 const
   HelpText = """
@@ -9,7 +10,7 @@ const
 Compiled at: $2, $3
 
 Usage:
-  koch.py [options] command [options for command]
+  koch [options] command [options for command]
 Options:
   --force, -f, -B, -b      forces rebuild
   --help, -h               shows this help and quits
@@ -23,4 +24,5 @@ Possible Commands:
 """ % [NimrodVersion & repeatChar(44-len(NimrodVersion)), 
        CompileDate, CompileTime]
 
+echo helpText
 
diff --git a/tests/tenuminh.nim b/tests/tenuminh.nim
deleted file mode 100755
index 02c71613b..000000000
--- a/tests/tenuminh.nim
+++ /dev/null
@@ -1,10 +0,0 @@
-type
-  TCardPts = enum
-    North, West, South, East
-
-  TCardPts2 = enum of TCardPts
-    N, W, S, E
-
-# If I do:
-var y = W
-echo($y & "=" & $ord(y)) #OUT W=5
diff --git a/tests/thallo.nim b/tests/thallo.nim
index 86aa89f0a..f1cae5897 100755
--- a/tests/thallo.nim
+++ b/tests/thallo.nim
@@ -61,11 +61,15 @@ for x, y in items([(1, 2), (3, 4), (6, 1), (5, 2)]):
   echo x
   echo y
   
+proc simpleConst(): int = return 34
+  
 # test constant evaluation: 
-const 
+const  
+  constEval3 = simpleConst()
   constEval = "abc".contains('b')
   constEval2 = fac(7)
 
+echo(constEval3)
 echo(constEval)
 echo(constEval2)
 echo(1.`+`(2))
diff --git a/tests/titer5.nim b/tests/titer5.nim
index c84c5c807..1ac37ba66 100755
--- a/tests/titer5.nim
+++ b/tests/titer5.nim
@@ -1,4 +1,6 @@
 # Test method call syntax for iterators:
+import strutils
+
 const lines = """abc  xyz"""
 
 for x in lines.split():