diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-11-29 16:07:51 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-11 21:23:21 +0100 |
commit | 1105d0364401226a2d7d479bd89d77a9da9ed787 (patch) | |
tree | 559160c7497208ca53fb05fc5e97ae03e12e4187 /tests/misc | |
parent | ca394ebd9514edd6e5f5e5c3d3145aa868744647 (diff) | |
download | Nim-1105d0364401226a2d7d479bd89d77a9da9ed787.tar.gz |
require errormsg to be specified before file.
Diffstat (limited to 'tests/misc')
-rw-r--r-- | tests/misc/t99bott.nim | 8 | ||||
-rw-r--r-- | tests/misc/tack.nim | 3 | ||||
-rw-r--r-- | tests/misc/tbug511622.nim | 4 | ||||
-rw-r--r-- | tests/misc/temit.nim | 5 | ||||
-rw-r--r-- | tests/misc/tevents.nim | 8 | ||||
-rw-r--r-- | tests/misc/tgenconstraints.nim | 3 | ||||
-rw-r--r-- | tests/misc/thintoff.nim | 12 | ||||
-rw-r--r-- | tests/misc/tinc.nim | 6 | ||||
-rw-r--r-- | tests/misc/tinit.nim | 3 | ||||
-rw-r--r-- | tests/misc/tinout.nim | 4 | ||||
-rw-r--r-- | tests/misc/tinvalidnewseq.nim | 5 | ||||
-rw-r--r-- | tests/misc/tissue710.nim | 2 | ||||
-rw-r--r-- | tests/misc/tnoinst.nim | 3 | ||||
-rw-r--r-- | tests/misc/tnolen.nim | 3 | ||||
-rw-r--r-- | tests/misc/tnot.nim | 2 | ||||
-rw-r--r-- | tests/misc/tparseopt.nim | 1 | ||||
-rw-r--r-- | tests/misc/tpos.nim | 3 | ||||
-rw-r--r-- | tests/misc/trawstr.nim | 4 | ||||
-rw-r--r-- | tests/misc/tsimtych.nim | 4 | ||||
-rw-r--r-- | tests/misc/tslices.nim | 5 | ||||
-rw-r--r-- | tests/misc/tstrange.nim | 8 | ||||
-rw-r--r-- | tests/misc/tvarious1.nim | 4 | ||||
-rw-r--r-- | tests/misc/tvarnums.nim | 3 |
23 files changed, 24 insertions, 79 deletions
diff --git a/tests/misc/t99bott.nim b/tests/misc/t99bott.nim index 62ccfbe16..f60023818 100644 --- a/tests/misc/t99bott.nim +++ b/tests/misc/t99bott.nim @@ -1,9 +1,9 @@ discard """ + errormsg: "cannot evaluate at compile time: bn" file: "t99bott.nim" line: 26 - errormsg: "cannot evaluate at compile time: bn" - disabled: false """ + ## 99 Bottles of Beer ## http://www.99-bottles-of-beer.net/ ## Nim version @@ -30,7 +30,3 @@ for bn in countdown(99, 1): echo "No more bottles of beer on the wall, no more bottles of beer." echo "Go to the store and buy some more, 99 bottles of beer on the wall." - - - - diff --git a/tests/misc/tack.nim b/tests/misc/tack.nim index a0afab9e8..fb89dc8b1 100644 --- a/tests/misc/tack.nim +++ b/tests/misc/tack.nim @@ -1,5 +1,4 @@ discard """ - file: "tack.nim" output: "125" """ # the Ackermann function @@ -17,5 +16,3 @@ proc ack(x, y: int): int = # echo(ack(0, 0)) write(stdout, ack(3, 4)) #OUT 125 - - diff --git a/tests/misc/tbug511622.nim b/tests/misc/tbug511622.nim index a5360423d..4b30e96e6 100644 --- a/tests/misc/tbug511622.nim +++ b/tests/misc/tbug511622.nim @@ -1,5 +1,4 @@ discard """ - file: "tbug511622.nim" output: "3" """ import StrUtils, Math @@ -11,6 +10,3 @@ proc FibonacciA(n: int): int64 = return int64((pow(p, fn) + pow(q, fn)) / sqrt(5.0)) echo FibonacciA(4) #OUT 3 - - - diff --git a/tests/misc/temit.nim b/tests/misc/temit.nim index c83235659..ee7455d4c 100644 --- a/tests/misc/temit.nim +++ b/tests/misc/temit.nim @@ -1,5 +1,4 @@ discard """ - file: "temit.nim" output: "509" """ # Test the new ``emit`` pragma: @@ -14,7 +13,3 @@ proc embedsC() = {.emit: """printf("%d\n", cvariable + (int)`nimVar`);""".} embedsC() - - - - diff --git a/tests/misc/tevents.nim b/tests/misc/tevents.nim index caf674084..045c9fc5b 100644 --- a/tests/misc/tevents.nim +++ b/tests/misc/tevents.nim @@ -1,8 +1,9 @@ discard """ -file: "tevents.nim" -output: '''HandlePrintEvent: Output -> Handled print event +output: ''' +HandlePrintEvent: Output -> Handled print event HandlePrintEvent2: Output -> printing for ME -HandlePrintEvent2: Output -> printing for ME''' +HandlePrintEvent2: Output -> printing for ME +''' """ import events @@ -45,4 +46,3 @@ ee.emit(obj.printEvent, eventargs) obj.printEvent.removeHandler(handleprintevent2) ee.emit(obj.printEvent, eventargs) - diff --git a/tests/misc/tgenconstraints.nim b/tests/misc/tgenconstraints.nim index 6e8fdc738..829da5173 100644 --- a/tests/misc/tgenconstraints.nim +++ b/tests/misc/tgenconstraints.nim @@ -1,8 +1,8 @@ discard """ + errormsg: "cannot instantiate T2" file: "tgenconstraints.nim" line: 25 disabled: true - errormsg: "cannot instantiate T2" """ type @@ -29,4 +29,3 @@ proc bar(x: int|TNumber): T1[type(x)] {.discardable.} = bar "test" bar 100 bar 1.1 - diff --git a/tests/misc/thintoff.nim b/tests/misc/thintoff.nim deleted file mode 100644 index 95318ce9b..000000000 --- a/tests/misc/thintoff.nim +++ /dev/null @@ -1,12 +0,0 @@ -discard """ - file: "thintoff.nim" - output: "0" -""" - -{.hint[XDeclaredButNotUsed]: off.} -var - x: int - -echo x #OUT 0 - - diff --git a/tests/misc/tinc.nim b/tests/misc/tinc.nim index 7819775e3..91f6223e2 100644 --- a/tests/misc/tinc.nim +++ b/tests/misc/tinc.nim @@ -1,12 +1,8 @@ discard """ + errormsg: "type mismatch: got <int>" file: "tinc.nim" line: 8 - errormsg: "type mismatch: got <int>" """ var x = 0 inc(x+1) - - - - diff --git a/tests/misc/tinit.nim b/tests/misc/tinit.nim index 02607909b..207cb17e8 100644 --- a/tests/misc/tinit.nim +++ b/tests/misc/tinit.nim @@ -1,5 +1,4 @@ discard """ - file: "tinit.nim" output: "Hello from module! Hello from main module!" """ # Test the new init section in modules @@ -8,5 +7,3 @@ import minit write(stdout, "Hello from main module!\n") #OUT Hello from module! Hello from main module! - - diff --git a/tests/misc/tinout.nim b/tests/misc/tinout.nim index 46af2f5de..bae0fb185 100644 --- a/tests/misc/tinout.nim +++ b/tests/misc/tinout.nim @@ -1,7 +1,7 @@ discard """ + errormsg: "type mismatch: got <int literal(3)>" file: "tinout.nim" line: 12 - errormsg: "type mismatch: got <int literal(3)>" """ # Test in out checking for parameters @@ -12,5 +12,3 @@ proc b() = abc(3) #ERROR b() - - diff --git a/tests/misc/tinvalidnewseq.nim b/tests/misc/tinvalidnewseq.nim index 66e9388ef..dec00fd4a 100644 --- a/tests/misc/tinvalidnewseq.nim +++ b/tests/misc/tinvalidnewseq.nim @@ -1,7 +1,7 @@ discard """ + errormsg: "type mismatch: got <array[0..6, string], int literal(7)>" file: "tinvalidnewseq.nim" line: 15 - errormsg: "type mismatch: got <array[0..6, string], int literal(7)>" """ import re, strutils @@ -22,6 +22,3 @@ var r: TUrl r = parseUrl(r"http://google.com/search?var=bleahdhsad") echo(r.domain) - - - diff --git a/tests/misc/tissue710.nim b/tests/misc/tissue710.nim index e2cca0024..ec125b840 100644 --- a/tests/misc/tissue710.nim +++ b/tests/misc/tissue710.nim @@ -1,7 +1,7 @@ discard """ + errorMsg: "attempting to call routine: '||'" file: "tissue710.nim" line: 8 - errorMsg: "attempting to call routine: '||'" """ var sum = 0 for x in 3..1000: diff --git a/tests/misc/tnoinst.nim b/tests/misc/tnoinst.nim index 25ebe8dfc..85db1e8e7 100644 --- a/tests/misc/tnoinst.nim +++ b/tests/misc/tnoinst.nim @@ -1,6 +1,6 @@ discard """ - line: 12 errormsg: "instantiate 'notConcrete' explicitly" + line: 12 disabled: "true" """ @@ -14,4 +14,3 @@ proc wrap[T]() = wrap[int]() - diff --git a/tests/misc/tnolen.nim b/tests/misc/tnolen.nim index 2831e5048..e0e8025d4 100644 --- a/tests/misc/tnolen.nim +++ b/tests/misc/tnolen.nim @@ -1,9 +1,8 @@ discard """ - line: 8 errormsg: "type mismatch: got <int literal(3)>" + line: 8 """ # please finally disallow Len(3) echo len(3) - diff --git a/tests/misc/tnot.nim b/tests/misc/tnot.nim index 5c268981e..a3669705b 100644 --- a/tests/misc/tnot.nim +++ b/tests/misc/tnot.nim @@ -1,7 +1,7 @@ discard """ + errormsg: "type mismatch" file: "tnot.nim" line: 14 - errormsg: "type mismatch" """ # BUG: following compiles, but should not: diff --git a/tests/misc/tparseopt.nim b/tests/misc/tparseopt.nim index 651689398..cbed5d476 100644 --- a/tests/misc/tparseopt.nim +++ b/tests/misc/tparseopt.nim @@ -1,5 +1,4 @@ discard """ - file: "tparseopt.nim" output: ''' parseopt first round diff --git a/tests/misc/tpos.nim b/tests/misc/tpos.nim index bedb62e62..0c8efa43d 100644 --- a/tests/misc/tpos.nim +++ b/tests/misc/tpos.nim @@ -1,5 +1,4 @@ discard """ - file: "tpos.nim" output: "6" """ # test this particular function @@ -31,5 +30,3 @@ var sub = "hello" var s = "world hello" write(stdout, mypos(sub, s)) #OUT 6 - - diff --git a/tests/misc/trawstr.nim b/tests/misc/trawstr.nim index 55e508acc..aa41071d5 100644 --- a/tests/misc/trawstr.nim +++ b/tests/misc/trawstr.nim @@ -1,12 +1,10 @@ discard """ + errormsg: "closing \" expected" file: "trawstr.nim" line: 10 - errormsg: "closing \" expected" """ # Test the new raw strings: const xxx = r"This is a raw string!" yyy = "This not\" #ERROR - - diff --git a/tests/misc/tsimtych.nim b/tests/misc/tsimtych.nim index 037172bd5..74a6ad4c0 100644 --- a/tests/misc/tsimtych.nim +++ b/tests/misc/tsimtych.nim @@ -1,12 +1,10 @@ discard """ + errormsg: "type mismatch: got <bool> but expected \'string\'" file: "tsimtych.nim" line: 10 - errormsg: "type mismatch: got <bool> but expected \'string\'" """ # Test 2 # Simple type checking var a: string a = false #ERROR - - diff --git a/tests/misc/tslices.nim b/tests/misc/tslices.nim index 388a46509..d063c5ebf 100644 --- a/tests/misc/tslices.nim +++ b/tests/misc/tslices.nim @@ -1,6 +1,6 @@ discard """ - file: "tslices.nim" - output: '''456456 +output: ''' +456456 456456 456456 Zugr5nd @@ -56,4 +56,3 @@ echo mystr var s = "abcdef" s[1 .. ^2] = "xyz" assert s == "axyzf" - diff --git a/tests/misc/tstrange.nim b/tests/misc/tstrange.nim index fee0f44e4..82a82d267 100644 --- a/tests/misc/tstrange.nim +++ b/tests/misc/tstrange.nim @@ -1,8 +1,9 @@ discard """ - file: "tstrange.nim" - output: '''hallo40 +output: ''' +hallo40 1 -2''' +2 +''' """ # test for extremely strange bug @@ -25,4 +26,3 @@ write(stdout, ack(5, 4)) let h=3 for x in 0.. <h.int: echo x - diff --git a/tests/misc/tvarious1.nim b/tests/misc/tvarious1.nim index 595c77919..9c0b541db 100644 --- a/tests/misc/tvarious1.nim +++ b/tests/misc/tvarious1.nim @@ -1,6 +1,6 @@ discard """ - file: "tlenopenarray.nim" - output: '''1 +output: ''' +1 0 Whopie 12 diff --git a/tests/misc/tvarnums.nim b/tests/misc/tvarnums.nim index 5daa2c4b8..39269b4c0 100644 --- a/tests/misc/tvarnums.nim +++ b/tests/misc/tvarnums.nim @@ -1,5 +1,4 @@ discard """ - file: "tvarnums.nim" output: "Success!" """ # Test variable length binary integers @@ -138,5 +137,3 @@ tm(low(int32)) tm(high(int32)) writeLine(stdout, "Success!") #OUT Success! - - |