summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorxzfc <xzfc@users.noreply.github.com>2018-10-11 14:34:56 +0700
committerAndreas Rumpf <rumpf_a@web.de>2018-10-11 09:34:56 +0200
commit8fc7cecfa21d666f6ae0f778570f14c92a8d223a (patch)
treec39643771b4fb3fef7433ae68377024a3c35f5e6 /tests
parentda4215af6a5046662db736ce2d5500ce0f38fe1b (diff)
downloadNim-8fc7cecfa21d666f6ae0f778570f14c92a8d223a.tar.gz
compiler: show name of instantiating context in error traces (#6763) (#9207)
Diffstat (limited to 'tests')
-rw-r--r--tests/concepts/t3330.nim4
-rw-r--r--tests/macros/tmsginfo.nim2
-rw-r--r--tests/testament/tester.nim5
3 files changed, 7 insertions, 4 deletions
diff --git a/tests/concepts/t3330.nim b/tests/concepts/t3330.nim
index 8021db827..3d0dde5d1 100644
--- a/tests/concepts/t3330.nim
+++ b/tests/concepts/t3330.nim
@@ -34,9 +34,9 @@ proc add(x: var string; y: char)
   required type: var string
   but expression 'k' is of type: Alias
 
-t3330.nim(48, 8) template/generic instantiation from here
+t3330.nim(48, 8) template/generic instantiation of `add` from here
 t3330.nim(55, 6) Foo: 'bar.value' cannot be assigned to
-t3330.nim(48, 8) template/generic instantiation from here
+t3330.nim(48, 8) template/generic instantiation of `add` from here
 t3330.nim(56, 6) Foo: 'bar.x' cannot be assigned to
 
 expression: test(bar)'''
diff --git a/tests/macros/tmsginfo.nim b/tests/macros/tmsginfo.nim
index ebdce0155..f08a231fb 100644
--- a/tests/macros/tmsginfo.nim
+++ b/tests/macros/tmsginfo.nim
@@ -1,6 +1,6 @@
 discard """
   nimout: '''tmsginfo.nim(21, 1) Warning: foo1 [User]
-tmsginfo.nim(22, 13) template/generic instantiation from here
+tmsginfo.nim(22, 13) template/generic instantiation of `foo2` from here
 tmsginfo.nim(15, 10) Warning: foo2 [User]
 tmsginfo.nim(23, 1) Hint: foo3 [User]
 tmsginfo.nim(19, 7) Hint: foo4 [User]
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim
index f1f07b3c0..15f44f871 100644
--- a/tests/testament/tester.nim
+++ b/tests/testament/tester.nim
@@ -53,7 +53,10 @@ let
   pegLineError =
     peg"{[^(]*} '(' {\d+} ', ' {\d+} ') ' ('Error') ':' \s* {.*}"
   pegLineTemplate =
-    peg"{[^(]*} '(' {\d+} ', ' {\d+} ') ' 'template/generic instantiation from here'.*"
+    peg"""
+      {[^(]*} '(' {\d+} ', ' {\d+} ') '
+      'template/generic instantiation' ( ' of `' [^`]+ '`' )? ' from here' .*
+    """
   pegOtherError = peg"'Error:' \s* {.*}"
   pegSuccess = peg"'Hint: operation successful'.*"
   pegOfInterest = pegLineError / pegOtherError