summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-05-27 23:16:00 +0200
committerAraq <rumpf_a@web.de>2013-05-27 23:16:00 +0200
commite1b668c868dbc647bb5da98d8e4769c2c9b351fd (patch)
treec1b4ca3a7fa14fa4aa3ec6b36bd85a693f511b46 /tests
parent66653e8f144f2e67a6e48158f9298d9f41b16b09 (diff)
downloadNim-e1b668c868dbc647bb5da98d8e4769c2c9b351fd.tar.gz
Revert "test cases for the new features"
This reverts commit 66653e8f144f2e67a6e48158f9298d9f41b16b09.
Diffstat (limited to 'tests')
-rw-r--r--tests/compile/tgenericdefaults.nim29
-rw-r--r--tests/compile/ttypeclasses.nim21
-rw-r--r--tests/run/tstaticparams.nim17
3 files changed, 0 insertions, 67 deletions
diff --git a/tests/compile/tgenericdefaults.nim b/tests/compile/tgenericdefaults.nim
deleted file mode 100644
index ad96f1851..000000000
--- a/tests/compile/tgenericdefaults.nim
+++ /dev/null
@@ -1,29 +0,0 @@
-type 
-  TFoo[T, U, R = int] = object
-    x: T
-    y: U
-    z: R
-
-  TBar[T] = TFoo[T, array[4, T], T]
-
-var x1: TFoo[int, float]
-
-static:
-  assert type(x1.x) is int
-  assert type(x1.y) is float
-  assert type(x1.z) is int
-  
-var x2: TFoo[string, R = float, U = seq[int]]
-
-static:
-  assert type(x2.x) is string
-  assert type(x2.y) is seq[int]
-  assert type(x2.z) is float
-
-var x3: TBar[float]
-
-static:
-  assert type(x3.x) is float
-  assert type(x3.y) is array[4, float]
-  assert type(x3.z) is float
-
diff --git a/tests/compile/ttypeclasses.nim b/tests/compile/ttypeclasses.nim
index 677229868..5e23e8489 100644
--- a/tests/compile/ttypeclasses.nim
+++ b/tests/compile/ttypeclasses.nim
@@ -5,8 +5,6 @@ type
   T1 = expr
   T2 = expr
 
-  Numeric = int|float
-
 proc takesExpr(x, y) =
   echo x, y
 
@@ -34,22 +32,3 @@ takesFoo(f, f)
 takes2Types(1, 1, "string")
 takes2Types[string, int]("test", "test", 1)
 
-proc takesSeq(x: seq) =
-  echo "seq"
-
-takesSeq(@[1, 2, 3])
-takesSeq(@["x", "y", "z"])
-
-proc takesSeqOfFoos(x: seq[TFoo]) =
-  echo "foo seq"
-
-var sf = newSeq[TFoo[int]](3)
-
-takesSeq(sf)
-takesSeqOfFoos(sf)
-
-proc takesFooOfNumeric(x: TFoo[Numeric]) =
-  echo "foo of numeric"
-
-takesFooOfNumeric(sf[0])
-
diff --git a/tests/run/tstaticparams.nim b/tests/run/tstaticparams.nim
deleted file mode 100644
index 3e501ed8b..000000000
--- a/tests/run/tstaticparams.nim
+++ /dev/null
@@ -1,17 +0,0 @@
-discard """
-  file: "tstaticparams.nim"
-  output: "abracadabra\ntest"
-"""
-
-type 
-  TFoo[T; Val: expr[string]] = object
-    data: array[4, T]
-
-proc takeFoo(x: TFoo) =
-  echo "abracadabra"
-  echo TFoo.Val
-
-var x: TFoo[int, "test"]
-
-takeFoo(x)
-