summary refs log tree commit diff stats
path: root/tests/compile
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2012-03-16 05:33:21 +0200
committerZahary Karadjov <zahary@gmail.com>2012-03-16 05:33:21 +0200
commit72f2a6e2755cdeaf1db85a9b119b694b9a2cb472 (patch)
treecb4dc5c42656a876337dbfce21e176d204ee35f6 /tests/compile
parent84806e6a61da2641b6e8cb34800c874dc74b90af (diff)
downloadNim-72f2a6e2755cdeaf1db85a9b119b694b9a2cb472.tar.gz
the test suite is mostly green again
Diffstat (limited to 'tests/compile')
-rwxr-xr-xtests/compile/tambsym2.nim4
-rwxr-xr-xtests/compile/ttableconstr.nim2
-rwxr-xr-xtests/compile/ttempl3.nim4
-rwxr-xr-xtests/compile/ttempl4.nim4
4 files changed, 6 insertions, 8 deletions
diff --git a/tests/compile/tambsym2.nim b/tests/compile/tambsym2.nim
index ecd9a4784..7758cc31a 100755
--- a/tests/compile/tambsym2.nim
+++ b/tests/compile/tambsym2.nim
@@ -1,8 +1,6 @@
 
 from sdl import PSurface
 
-discard SDL.CreateRGBSurface(SDL.SWSURFACE, 23, 34, 
+discard SDL.CreateRGBSurface(SDL.SWSURFACE, 23, 34,
       32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xff000000'i32)
 
-
-
diff --git a/tests/compile/ttableconstr.nim b/tests/compile/ttableconstr.nim
index 9433e9985..c627e68e8 100755
--- a/tests/compile/ttableconstr.nim
+++ b/tests/compile/ttableconstr.nim
@@ -1,6 +1,6 @@
 # Test if the new table constructor syntax works:
 
-template ignoreExpr(e: expr): stmt =
+template ignoreExpr(e: expr): stmt {.immediate.} =
   nil
 
 # test first class '..' syntactical citizen:  
diff --git a/tests/compile/ttempl3.nim b/tests/compile/ttempl3.nim
index 7b2c70f79..d8e67cc3e 100755
--- a/tests/compile/ttempl3.nim
+++ b/tests/compile/ttempl3.nim
@@ -26,13 +26,13 @@ echo(ha)
 
 
 # Test identifier generation:
-template prefix(name: expr): expr = `"hu" name`
+template prefix(name: expr): expr {.immediate.} = `"hu" name`
 
 var `hu "XYZ"` = "yay"
 
 echo prefix(XYZ)
 
-template typedef(name: expr, typ: typeDesc) = 
+template typedef(name: expr, typ: typeDesc) {.immediate.} =
   type
     `T name`* = typ
     `P name`* = ref `T name`
diff --git a/tests/compile/ttempl4.nim b/tests/compile/ttempl4.nim
index a5ad2000f..26c82e471 100755
--- a/tests/compile/ttempl4.nim
+++ b/tests/compile/ttempl4.nim
@@ -1,7 +1,7 @@
 
-template `:=`(name, val: expr): stmt =
+template `:=`(name, val: expr): stmt {.immediate.} =
   var name = val
-    
+
 ha := 1 * 4
 hu := "ta-da" == "ta-da"
 echo ha, hu