summary refs log tree commit diff stats
path: root/tests/exception
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exception')
-rw-r--r--tests/exception/tcontinuexc.nim4
-rw-r--r--tests/exception/texceptionbreak.nim1
-rw-r--r--tests/exception/texcsub.nim4
-rw-r--r--tests/exception/tfinally.nim6
-rw-r--r--tests/exception/tfinally2.nim12
-rw-r--r--tests/exception/tfinally3.nim7
-rw-r--r--tests/exception/tfinally4.nim1
-rw-r--r--tests/exception/tnestedreturn.nim1
-rw-r--r--tests/exception/tnestedreturn2.nim1
-rw-r--r--tests/exception/treraise.nim4
-rw-r--r--tests/exception/tunhandledexc.nim3
-rw-r--r--tests/exception/twrongexc.nim5
12 files changed, 13 insertions, 36 deletions
diff --git a/tests/exception/tcontinuexc.nim b/tests/exception/tcontinuexc.nim
index 2a05da9c0..b7560a605 100644
--- a/tests/exception/tcontinuexc.nim
+++ b/tests/exception/tcontinuexc.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "tcontinuexc.nim"
   outputsub: "ECcaught"
   exitcode: "1"
 """
@@ -25,6 +24,3 @@ finally:
   echo "caught"
 
 #OUT ECcaught
-
-
-
diff --git a/tests/exception/texceptionbreak.nim b/tests/exception/texceptionbreak.nim
index 00dd8ed9f..6548192c6 100644
--- a/tests/exception/texceptionbreak.nim
+++ b/tests/exception/texceptionbreak.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "tnestedbreak.nim"
   output: "1\n2\n3\n4"
 """
 
diff --git a/tests/exception/texcsub.nim b/tests/exception/texcsub.nim
index 02125d2c0..463e95613 100644
--- a/tests/exception/texcsub.nim
+++ b/tests/exception/texcsub.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "texcsub.nim"
   output: "caught!"
 """
 # Test inheritance for exception matching:
@@ -12,6 +11,3 @@ except:
   echo "wtf!?"
 
 #OUT caught!
-
-
-
diff --git a/tests/exception/tfinally.nim b/tests/exception/tfinally.nim
index 7a218b444..c5b1dd841 100644
--- a/tests/exception/tfinally.nim
+++ b/tests/exception/tfinally.nim
@@ -1,6 +1,6 @@
 discard """
-  file: "tfinally.nim"
-  output: '''came
+  output: '''
+came
 here
 3
 msg1
@@ -59,4 +59,4 @@ try:
 except:
   echo "except2"
 finally:
-  echo "finally2"
\ No newline at end of file
+  echo "finally2"
diff --git a/tests/exception/tfinally2.nim b/tests/exception/tfinally2.nim
index f1acf2774..dae1a468a 100644
--- a/tests/exception/tfinally2.nim
+++ b/tests/exception/tfinally2.nim
@@ -1,9 +1,10 @@
 discard """
-  file: "tfinally2.nim"
-  output: '''A
+output: '''
+A
 B
 C
-D'''
+D
+'''
 """
 # Test break in try statement:
 
@@ -24,7 +25,4 @@ proc main: int =
   finally:
     echo("D")
 
-discard main() #OUT ABCD
-
-
-
+discard main()
diff --git a/tests/exception/tfinally3.nim b/tests/exception/tfinally3.nim
index 6098672a2..9053d397d 100644
--- a/tests/exception/tfinally3.nim
+++ b/tests/exception/tfinally3.nim
@@ -1,7 +1,8 @@
 discard """
-  file: "tfinally3.nim"
-  outputsub: '''false
-Within finally->try'''
+  outputsub: '''
+false
+Within finally->try
+'''
   exitCode: 1
 """
 # Test break in try statement:
diff --git a/tests/exception/tfinally4.nim b/tests/exception/tfinally4.nim
index 3aa707ff6..feaf1bc96 100644
--- a/tests/exception/tfinally4.nim
+++ b/tests/exception/tfinally4.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "tfinally4.nim"
   output: "B1\nA1\n1\nB1\nB2\ncatch\nA1\n1\nB1\nA1\nA2\n2\nB1\nB2\ncatch\nA1\nA2\n0\nB1\nA1\n1\nB1\nB2\nA1\n1\nB1\nA1\nA2\n2\nB1\nB2\nA1\nA2\n3"
 """
 
diff --git a/tests/exception/tnestedreturn.nim b/tests/exception/tnestedreturn.nim
index bf26f4903..acb83d2c8 100644
--- a/tests/exception/tnestedreturn.nim
+++ b/tests/exception/tnestedreturn.nim
@@ -1,6 +1,5 @@
 discard """
   targets: "c cpp"
-  file: "tnestedreturn.nim"
   output: "A\nB\nC\n"
 """
 
diff --git a/tests/exception/tnestedreturn2.nim b/tests/exception/tnestedreturn2.nim
index 79523a883..167d09b96 100644
--- a/tests/exception/tnestedreturn2.nim
+++ b/tests/exception/tnestedreturn2.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "tnestedreturn2.nim"
   outputsub: "Error: unhandled exception: Problem [OSError]"
   exitcode: "1"
 """
diff --git a/tests/exception/treraise.nim b/tests/exception/treraise.nim
index b2a11d34f..17a38aa53 100644
--- a/tests/exception/treraise.nim
+++ b/tests/exception/treraise.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "treraise.nim"
   outputsub: "Error: unhandled exception: bla [ESomeOtherErr]"
   exitcode: "1"
 """
@@ -19,6 +18,3 @@ except ESomething:
   echo("Error happened")
 except:
   raise
-
-
-
diff --git a/tests/exception/tunhandledexc.nim b/tests/exception/tunhandledexc.nim
index f0fa2bf27..6ca311d38 100644
--- a/tests/exception/tunhandledexc.nim
+++ b/tests/exception/tunhandledexc.nim
@@ -1,7 +1,6 @@
 discard """
-  file: "tunhandledexc.nim"
   cmd: "nim $target -d:release $options $file"
-  outputsub: '''tunhandledexc.nim(16)    genErrors
+  outputsub: '''tunhandledexc.nim(15)    genErrors
 Error: unhandled exception: bla [ESomeOtherErr]'''
   exitcode: "1"
 """
diff --git a/tests/exception/twrongexc.nim b/tests/exception/twrongexc.nim
index b224d4c83..9c656f3d9 100644
--- a/tests/exception/twrongexc.nim
+++ b/tests/exception/twrongexc.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "twrongexc.nim"
   outputsub: "Error: unhandled exception:  [ValueError]"
   exitcode: "1"
 """
@@ -7,7 +6,3 @@ try:
   raise newException(ValueError, "")
 except OverflowError:
   echo("Error caught")
-
-
-
-