diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-04-11 07:25:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 14:25:41 +0200 |
commit | ceadf54d7649b8cc728fd0b6df966bbf28bf55bd (patch) | |
tree | 4106775d096082764b3c614ee74b44e21c23988a /testament | |
parent | a5b30c94c2dcd0f17b37685d9ce96eee959ba554 (diff) | |
download | Nim-ceadf54d7649b8cc728fd0b6df966bbf28bf55bd.tar.gz |
iterable[T] (#17196)
* fix failing test toSeq in manual which now works * changelog * reject proc fn(a: iterable) * add iterable to spec * remove MCS/UFCS limitation that now works
Diffstat (limited to 'testament')
-rw-r--r-- | testament/lib/stdtest/testutils.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testament/lib/stdtest/testutils.nim b/testament/lib/stdtest/testutils.nim index 58d136696..abffff24c 100644 --- a/testament/lib/stdtest/testutils.nim +++ b/testament/lib/stdtest/testutils.nim @@ -79,3 +79,9 @@ template whenVMorJs*(bodyIf, bodyElse) = else: when defined(js): bodyIf else: bodyElse + +template accept*(a) = + doAssert compiles(a) + +template reject*(a) = + doAssert not compiles(a) |