diff options
author | Clyybber <darkmine956@gmail.com> | 2020-07-14 19:33:10 +0200 |
---|---|---|
committer | Clyybber <darkmine956@gmail.com> | 2020-07-14 19:50:42 +0200 |
commit | f2b041f1684430d0118864b3900c54a1bfc15fa3 (patch) | |
tree | fee59e4117a9ddb4edb4a5c2a82a557019ff756a | |
parent | ddfb7d9877920564ceec7863930380d21aa23f47 (diff) | |
download | Nim-f2b041f1684430d0118864b3900c54a1bfc15fa3.tar.gz |
Reenable a few tests
-rw-r--r-- | tests/generics/texplicitgeneric2.nim | 7 | ||||
-rw-r--r-- | tests/misc/tnoforward.nim | 2 | ||||
-rw-r--r-- | tests/trmacros/tdisallowif.nim | 5 | ||||
-rw-r--r-- | tests/typerel/ttypenovalue.nim | 3 |
4 files changed, 7 insertions, 10 deletions
diff --git a/tests/generics/texplicitgeneric2.nim b/tests/generics/texplicitgeneric2.nim index 573b10ae8..37b133130 100644 --- a/tests/generics/texplicitgeneric2.nim +++ b/tests/generics/texplicitgeneric2.nim @@ -1,6 +1,5 @@ discard """ output: "Key: 12 value: 12Key: 13 value: 13 Key: A value: 12 Key: B value: 13" - disabled: true """ # test explicit type instantiation @@ -14,12 +13,12 @@ proc newDict*[TKey, TValue](): PDict[TKey, TValue] = new(result) result.data = @[] -proc add*(d: PDict, k: TKey, v: TValue) = +proc add*(d: PDict, k: d.TKey, v: d.TValue) = d.data.add((k, v)) -#iterator items*(d: PDict): tuple[k: TKey, v: TValue] = -# for k, v in items(d.data): yield (k, v) +iterator items*(d: PDict): tuple[k: d.TKey, v: d.TValue] = + for k, v in items(d.data): yield (k, v) var d = newDict[int, string]() d.add(12, "12") diff --git a/tests/misc/tnoforward.nim b/tests/misc/tnoforward.nim index 3e96e3489..b6a71897a 100644 --- a/tests/misc/tnoforward.nim +++ b/tests/misc/tnoforward.nim @@ -1,5 +1,5 @@ discard """ - disabled: true + output: "10" """ # {. noforward: on .} diff --git a/tests/trmacros/tdisallowif.nim b/tests/trmacros/tdisallowif.nim index 36f60800e..8d83f6ddf 100644 --- a/tests/trmacros/tdisallowif.nim +++ b/tests/trmacros/tdisallowif.nim @@ -1,7 +1,6 @@ discard """ - errormsg: "usage of 'disallowIf' is a user-defined error" + errormsg: "usage of 'disallowIf' is an {.error.} defined at tdisallowif.nim(10, 1)" line: 24 - disabled: true """ template optZero{x+x}(x: int): int = x*3 @@ -11,7 +10,7 @@ template optSubstr1{x = substr(x, 0, b)}(x: string, b: int) = setlen(x, b+1) template disallowIf{ if cond: action else: action2 -}(cond: bool, action, action2: stmt) {.error.} = action +}(cond: bool, action, action2: typed) {.error.} = action var y = 12 echo y+y diff --git a/tests/typerel/ttypenovalue.nim b/tests/typerel/ttypenovalue.nim index b86baf8b4..9af978466 100644 --- a/tests/typerel/ttypenovalue.nim +++ b/tests/typerel/ttypenovalue.nim @@ -1,7 +1,6 @@ discard """ - errormsg: "value expected, but got a type" + errormsg: "invalid type: 'type seq[tuple[title: string, body: string]]' for var" line: 7 - disabled: true """ proc crashAndBurn() = |