summary refs log tree commit diff stats
path: root/tests/deprecated
diff options
context:
space:
mode:
Diffstat (limited to 'tests/deprecated')
-rw-r--r--tests/deprecated/tannot.nim9
-rw-r--r--tests/deprecated/tdeprecated.nim27
-rw-r--r--tests/deprecated/tnoannot.nim7
3 files changed, 34 insertions, 9 deletions
diff --git a/tests/deprecated/tannot.nim b/tests/deprecated/tannot.nim
new file mode 100644
index 000000000..d14f6cc23
--- /dev/null
+++ b/tests/deprecated/tannot.nim
@@ -0,0 +1,9 @@
+discard """
+  nimout: '''tannot.nim(9, 1) Warning: efgh; foo1 is deprecated [Deprecated]
+tannot.nim(9, 8) Warning: abcd; foo is deprecated [Deprecated]
+'''
+"""
+
+let foo* {.deprecated: "abcd".} = 42
+var foo1* {.deprecated: "efgh".} = 42
+foo1 = foo
diff --git a/tests/deprecated/tdeprecated.nim b/tests/deprecated/tdeprecated.nim
index 920f350cc..ba8d579ad 100644
--- a/tests/deprecated/tdeprecated.nim
+++ b/tests/deprecated/tdeprecated.nim
@@ -1,8 +1,21 @@
 discard """
-  nimout: '''tdeprecated.nim(10, 3) Warning: a is deprecated [Deprecated]
-tdeprecated.nim(17, 11) Warning: asdf; enum 'Foo' which contains field 'a' is deprecated [Deprecated]
+  nimout: '''
+tdeprecated.nim(23, 3) Warning: a is deprecated [Deprecated]
+tdeprecated.nim(30, 11) Warning: asdf; enum 'Foo' which contains field 'a' is deprecated [Deprecated]
+tdeprecated.nim(40, 16) Warning: use fooX instead; fooA is deprecated [Deprecated]
+end
 '''
 """
+
+
+
+
+
+
+## line 15
+
+
+
 block:
   var
     a {.deprecated.}: array[0..11, int]
@@ -17,3 +30,13 @@ block t10111:
   var _ = a
   
 
+block: # issue #8063
+  type
+    Foo = enum
+      fooX
+
+  {.deprecated: [fooA: fooX].}
+  let
+    foo: Foo = fooA
+  echo foo
+  static: echo "end"
diff --git a/tests/deprecated/tnoannot.nim b/tests/deprecated/tnoannot.nim
deleted file mode 100644
index ac168952e..000000000
--- a/tests/deprecated/tnoannot.nim
+++ /dev/null
@@ -1,7 +0,0 @@
-discard """
-  errormsg: "annotation to deprecated not supported here"
-  line: 7
-"""
-
-var foo* {.deprecated.} = 42
-var foo1* {.deprecated: "no".} = 42