Nim/tests/macros
Jake Leahy 900fe8f501
Add contains to std/macrocache (#21304)
* Add test cases

* Implement contains for CacheSeq

* Implement contains for CacheTable

* Fix implementation of hasKey

* Remove contains for CacheSeq

Fix runnable examples

I was accidently using --doccmd:skip so I didn't spot the failure locally

* Implement hasKey as a VM callback instead of magic

* Implement suggestions from PR

Co-Authored-By: ringabout <ringabout@users.noreply.github.com>

* Update lib/core/macrocache.nim

---------

Co-authored-by: ringabout <ringabout@users.noreply.github.com>
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2023-02-01 10:00:10 +01:00
..
m18235.nim fixes #18235 - proc annotation type macro sym leak (#18249) 2021-06-14 09:21:33 +02:00
macro_bug.nim Remove immediate pragma (#11308) 2019-05-29 22:21:51 +02:00
mparsefile.nim parseExpr/parseStmt accept filename, fixes #13540 (#19182) 2021-11-24 12:22:40 +01:00
t7454.nim Return an error symbol as macro output if needed (#8116) 2018-06-27 21:43:07 +02:00
t7875.nim close #7875 add testcase (#17611) 2021-04-02 11:56:30 +02:00
t8997.nim fix #10591 regression (#10592) 2019-02-06 22:31:36 -06:00
t14227.nim add testcase for #14227 (#15794) 2020-10-30 15:53:45 +01:00
t14511.nim fixes #14511 [backport:1.4] (#18732) 2021-08-25 17:27:00 +00:00
t14847.nim close #14847(add testcase for #14847) (#16045) 2020-11-19 08:31:54 +01:00
t16758.nim fix #16758 Nim crashes in fixAbstractType (#20855) 2022-12-11 06:58:29 +01:00
t17836.nim fix #17836 (typed macro isNil for proc params) (#17841) 2021-04-25 10:30:52 +02:00
t18203.nim Don't report unused hints for consumed AST (#18270) 2021-06-16 02:45:05 +02:00
t18235.nim fixes #18235 - proc annotation type macro sym leak (#18249) 2021-06-14 09:21:33 +02:00
t19766_20114.nim store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
t20067.nim fix #20067, fix #18976 [backport] (#20069) 2022-07-22 15:04:07 +08:00
tastrepr.nim make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
tbindsym.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tcasestmtmacro.nim caseStmtMacros no longer experimental, experimental manual refactor (#19173) 2021-11-23 16:30:17 +01:00
tclosuremacro.nim Remove support for named procs with sugar.=> (#17220) 2021-03-05 12:08:03 +01:00
tcollect.nim add tcollect test for the new for-loops as expressions feature 2018-09-11 19:14:31 +02:00
tcomplexecho.nim Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
tcprag.nim rename a file, so that megatest doesn't complain 2019-05-29 15:44:52 +02:00
tdumpast.nim macros.treeRepr + friends: collapse SymChoice (#18072) 2021-06-05 06:58:26 +02:00
tdumpast2.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tdumpastgen.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tdumptree.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tescape_var_into_quotedo_as_const.nim fixes #9864 [backport] 2018-12-05 10:58:18 +01:00
texpectIdent1.nim add expectIdent to macros (#12778) 2020-03-11 08:27:31 +01:00
texpectIdent2.nim add expectIdent to macros (#12778) 2020-03-11 08:27:31 +01:00
tforloop_macro1.nim "for-loop macros" are no longer an experimental feature (#15288) 2020-09-08 14:25:25 +02:00
tgetimpl.nim store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
tgetraiseslist.nim implements https://github.com/nim-lang/RFCs/issues/258 (#15503) 2020-10-06 16:47:15 +02:00
tgettype.nim getType now works with tyInferred (arising from concepts); refs #18220 (#18241) 2021-06-12 21:35:12 +02:00
tgettype2.nim make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
tgettype3.nim fixes #5131 2016-12-20 22:42:25 +01:00
tgettypeinst.nim remove deprecated type pragma syntax, fix bugs that required it (#20199) 2022-09-03 09:52:13 +02:00
tincremental.nim Compiler plugin for implementing incremental computation in user space (#10819) 2019-04-11 23:09:11 +02:00
tinvalidtypesym.nim fix regression in align (#12680) 2019-11-19 09:58:47 +01:00
tisexported.nim Implement isExported for symbols in macros (#11963) 2019-08-18 11:51:28 +02:00
tlocktypednode1.nim Lock semchecked ast for macros (#11883) [bugfix] 2019-08-08 16:57:06 +02:00
tlocktypednode2.nim Lock semchecked ast for macros (#11883) [bugfix] 2019-08-08 16:57:06 +02:00
tlocktypednode3.nim Lock semchecked ast for macros (#11883) [bugfix] 2019-08-08 16:57:06 +02:00
tmacro1.nim backtick and export marker handling in eqIdent (#12574) 2019-11-07 14:40:44 +01:00
tmacro2.nim fix #15326 (#15341) 2020-09-16 21:37:23 +02:00
tmacro3.nim Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
tmacro4.nim remove unused imports from tests 2019-11-06 14:35:45 +01:00
tmacro5.nim Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
tmacro6.nim update tests that tested for the 'discard' error messages 2020-05-02 22:31:19 +02:00
tmacro7.nim Lock semchecked ast for macros (#11883) [bugfix] 2019-08-08 16:57:06 +02:00
tmacro8.nim close #8573 by adding a test 2019-05-30 11:13:29 +02:00
tmacroaspragma.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tmacrogenerics.nim fix for return in macro (#9666); fixes #5874 2019-05-20 12:18:53 +02:00
tmacrogensym.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tmacrogetimpl.nim Fixes #5034 illformed AST from getImpl with proc returning value (#17976) 2021-05-31 22:51:32 +02:00
tmacros1.nim fix NimNode comment repr() regression [backport: 1.2] (#19726) 2022-04-25 11:19:21 +02:00
tmacros_issues.nim Fix doubly typed forward declarations (#18279) 2021-06-16 16:40:22 +02:00
tmacros_various.nim Add contains to std/macrocache (#21304) 2023-02-01 10:00:10 +01:00
tmacrostmt.nim Implement rendering of []=, {}, {}= braces (#14539) 2020-06-01 19:56:17 +02:00
tmacrotypes.nim Fix #5691 (#15158) 2020-08-27 15:50:59 +02:00
tmemit.nim Clean up macros (#14959) 2020-07-14 16:44:56 +02:00
tmsginfo.nim compiler: show name of instantiating context in error traces (#6763) (#9207) 2018-10-11 09:34:56 +02:00
tnewlit.nim macros.newLit now works for ref object types (#12307) 2019-09-30 22:24:57 +02:00
tnewproc.nim add progmas to params of macros.newProc (#11025) 2019-04-27 12:22:02 +01:00
tnodecompare.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tparsefile.nim parseExpr/parseStmt accept filename, fixes #13540 (#19182) 2021-11-24 12:22:40 +01:00
tprochelpers.nim Allow std/macros.params to work with nnkProcTy (#19563) 2022-02-25 12:57:58 +01:00
tquotedo.nim fix #10339 by returning type attached to nkEmpty (#10370) 2019-01-23 11:17:32 +01:00
tquotewords.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
trecmacro.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
treturnsempty.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tsame_name_497.nim Remove immediate pragma (#11308) 2019-05-29 22:21:51 +02:00
tsametype.nim megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
tslice.nim Add proc [](n: NimNode, s: HSlice[T, U]): seq[NimNode] to macros (#7735) 2018-11-10 14:10:50 +01:00
tstaticparamsmacro.nim defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
tstringinterp.nim Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
tstructuredlogging.nim new .redefine pragma for templates, warn on redefinition without it (#20211) 2022-08-23 21:41:30 +02:00
ttemplatesymbols.nim Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
ttryparseexpr.nim revert parser stmtListExpr (#11007) 2019-04-17 11:55:41 +02:00
ttypenodes.nim accept object type node from macros (#19179) 2021-11-24 16:34:42 +01:00
tvarargsuntyped.nim make megatest green 2019-01-13 17:19:36 +01:00
tvtable.nim remove deprecated type pragma syntax, fix bugs that required it (#20199) 2022-09-03 09:52:13 +02:00
twrapiterator.nim fixes #7093 2018-01-18 11:40:18 +01:00
typesafeprintf.nim make typesafeprintf test green 2018-07-17 20:33:42 +02:00
typesapi2.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00