Nim/tests
ringabout d4afa53fd5
fixes #13583; enforce void for nkWhileStmt (#20947)
* fixes #13583; enfore void for nkWhileStmt

* one more case
2022-11-29 06:41:38 +01:00
..
actiontable
alias fix #19349 incompatible type when mixing float32 and cfloat in generics (#20551) 2022-10-21 09:28:18 +02:00
align testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343) 2020-12-14 10:58:29 +01:00
ambsym closed ambiguous enum defaults to first overload (#20457) 2022-10-01 13:30:23 +02:00
arc rename std/threads to std/typedthreads (#20850) 2022-11-16 16:35:20 +01:00
arithm JS: fix div uint64 no truncation (#16899) 2021-02-15 14:22:46 +01:00
array style usages part one (openarray => openArray) (#19321) 2022-01-04 13:29:50 +01:00
assert revert #20719; relieve std/assertions of the sysFatal dep (#20743) 2022-11-04 09:53:19 +01:00
assign defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
astoverload
astspec fix deprecated example (#18721) 2021-08-21 08:22:00 +02:00
async fixes ptr to cstring warnings[backport] (#20848) 2022-11-16 10:22:51 +01:00
avr default threads on (#19368) 2022-07-06 13:06:41 +02:00
benchmarks fix #16752: threadvar now works with importcpp types; osx now uses native TLS (--tlsEmulation:off), which can be orders of magnitude faster (#16750) 2021-01-27 22:35:43 +01:00
bind 'lock levels' are deprecated, now a noop (#20539) 2022-10-11 09:17:09 +02:00
borrow borrowed procs can have a body now for documentation generation (#20617) 2022-10-24 10:08:39 +02:00
casestmt fix #18964 Small string case with else statement first in AST evaluat… (#20862) 2022-11-22 20:08:17 +01:00
ccgbugs move widestrs out of system (#20462) 2022-10-01 22:35:09 +02:00
ccgbugs2 [add testcase] NRVO does not occur with init procedures (#19462) 2022-01-29 14:06:54 +01:00
clearmsg
closure fix #20152 Illegal capture of closure iterator, when should be legal (#20607) 2022-10-21 09:59:05 +02:00
cnstseq
collections follow up #20109; remove shallow seqs/strings for ORC (#20502) 2022-10-06 07:16:50 +02:00
compilepragma
compiler correct grammar (ref #20199) and add check for grammar.txt (#20494) 2022-10-06 16:36:32 +02:00
compilerapi big steps torwards an efficient, simple IC implementation (#16543) 2021-01-02 07:30:39 +01:00
compilerfeatures fix #16693: testament spec nimout too lax (#16698) 2021-04-04 13:47:28 -07:00
compiles deprecate unsafeAddr; extend addr (#19373) 2022-01-16 11:08:38 +01:00
concat
concepts fix bugs with dot & call operators [backport] (#20931) 2022-11-28 21:33:02 +01:00
constr fix #18990 Regression in proc symbol resolution; Error: attempting to… (#20554) 2022-10-12 20:44:45 -04:00
constraints
constructors Turn some of the errors back into warnings 2020-04-01 19:38:44 +02:00
controlflow An unnamed break in a block now gives an UnnamedBreak warning (#20901) 2022-11-24 07:31:47 +01:00
converter follow up #20109; remove shallow seqs/strings for ORC (#20502) 2022-10-06 07:16:50 +02:00
coroutines fix #15628 (#16387) 2021-01-21 17:31:47 +01:00
cpp closes #4678; add testcase (#20634) 2022-10-24 09:26:07 +08:00
defaultprocparam Add testcase for #12252 (#15676) 2020-10-22 12:51:03 +02:00
deprecated store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
destructor fixes a severe bug of testament (#20832) 2022-11-17 09:38:07 +08:00
dir with space
discard fixes #13583; enforce void for nkWhileStmt (#20947) 2022-11-29 06:41:38 +01:00
distinct remove a special case in sigmatch; distinct pointer types no longer match nil type (#20251) 2022-08-23 19:27:20 +02:00
distros fix tdistros test which was failing on Nightlies 2020-04-28 15:59:32 +02:00
dll don't use {.rtl.} for generics, otherwise -d:useNimRtl gives ambiguous identifier nimrtl error (#18406) 2021-07-01 11:14:01 +02:00
effects move asyncftpclient to nimble packages (#20952) 2022-11-28 21:17:50 +01:00
enum closes #12589; add testcase (#20769) 2022-11-06 11:46:51 +01:00
errmsgs revert #20719; relieve std/assertions of the sysFatal dep (#20743) 2022-11-04 09:53:19 +01:00
exception An unnamed break in a block now gives an UnnamedBreak warning (#20901) 2022-11-24 07:31:47 +01:00
exprs fix #16693: testament spec nimout too lax (#16698) 2021-04-04 13:47:28 -07:00
fields use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
float fixes ptr to cstring warnings[backport] (#20848) 2022-11-16 10:22:51 +01:00
fragmentation
friends
gc remove shallowCopy for ARC/ORC (#20070) 2022-07-26 16:51:01 +02:00
generics fix #6637 array index type depends generic (#20673) 2022-10-27 12:22:04 +02:00
gensym defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
global fix #20866 [ORC] Bad codegen for global pointer to iterator (#20876) 2022-11-22 20:05:16 +01:00
ic defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
import_in_config
importalls typo: nonexistant => nonexistent (#17918) 2021-05-02 00:26:41 +02:00
init DAA and 'out' parameters (#20506) 2022-10-06 17:08:41 +02:00
isolate fixes #19013 [backport:1.6] (#19111) 2021-11-09 12:43:16 +01:00
iter An unnamed break in a block now gives an UnnamedBreak warning (#20901) 2022-11-24 07:31:47 +01:00
js fix #8821 JS codegen can produce extreme switch statements with case … (#20548) 2022-10-14 12:21:02 +02:00
lent 'lock levels' are deprecated, now a noop (#20539) 2022-10-11 09:17:09 +02:00
let Allow let to not have value when using importc (#14258) 2020-05-12 20:28:18 +02:00
lexer fixes #15688; handle strongSpace overflow issues (#20724) 2022-11-03 09:18:09 +01:00
lookups new .redefine pragma for templates, warn on redefinition without it (#20211) 2022-08-23 21:41:30 +02:00
macros store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
magics Add nkFastAsgn into semExpr (#20939) 2022-11-27 20:09:25 +01:00
manyloc defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
metatype defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
method fixes #20515; base method requires explicit {.gcsafe.} to be GC-safe (#20574) 2022-10-16 13:20:05 +02:00
misc fixes #20914; fixes the alignment of big sets (#20918) 2022-11-26 07:48:11 +01:00
modules defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
namedparams
navigator IC navigator: added support for include files (#17784) 2021-04-19 22:37:09 +02:00
newconfig fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6] (#19641) 2022-03-26 11:50:15 +01:00
nimble testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
nimdoc fix #16993, #18054, #17835 runnableExamples now works with templates and nested templates (#18082) 2021-06-02 09:02:14 -07:00
niminaction defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
notnil add testcase for #9466 (#17538) 2021-03-28 00:57:22 -07:00
objects fixes #20856; store defaults directly (#20859) 2022-11-17 09:38:50 +08:00
objvariant fix #19266; allow reassign discriminant field (#19567) 2022-02-25 20:33:28 +01:00
openarray enable static tests for topenarray (#20620) 2022-10-23 00:36:11 +08:00
osproc fixes #18058 (#18162) 2021-06-03 17:12:45 +02:00
overflw Fix #15706 (#15846) 2020-11-07 08:00:41 +00:00
overload fixes #20645 (#20646) 2022-10-24 21:41:29 +02:00
package Refactor and doc package handling, module name mangling (#19821) 2022-05-30 18:52:19 +02:00
package_level_objects
parallel fixes #13781; fixes #14901; add acyclic pragmas to FlowVar (#20804) 2022-11-10 16:54:39 +08:00
parser allow proc expressions in place of statements (#20935) 2022-11-29 06:37:00 +01:00
pragmas 'lock levels' are deprecated, now a noop (#20539) 2022-10-11 09:17:09 +02:00
proc fix #18136 tests/proc/t17157.nim now gives SIGSEGV instead of error (#20555) 2022-10-13 06:39:43 +02:00
procvar
range fix #19678 Broken behavior with string ranges in case labels (#20475) 2022-10-01 18:17:07 +02:00
rational Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
realtimeGC testament: remove deadcode related to realtimeGC, testC, callCCompiler (#18087) 2021-05-26 11:49:01 -07:00
sandwich fixes #11225; generic sandwich problems; [backport:1.2] (#17255) 2021-03-09 20:19:24 +01:00
sets overloadable enums no longer experimental (#20298) 2022-09-05 23:38:38 +02:00
showoff style usages part one (openarray => openArray) (#19321) 2022-01-04 13:29:50 +01:00
slice allow HSlice bounded by constants of distinct types (#19219) [backport:1.2] 2021-12-06 20:38:23 +01:00
specialops fix bugs with dot & call operators [backport] (#20931) 2022-11-28 21:33:02 +01:00
statictypes fix #20148 implicit compile time conversion int to ranged float cause… (#20698) 2022-10-29 18:04:05 +02:00
stdlib Allow some tests to run without network (#20955) 2022-11-29 06:40:28 +01:00
stmt fix #15972 (#15994) 2020-11-18 00:14:14 +00:00
strictnotnil [Testament] Extend and document message testing aids (#19996) 2022-09-01 17:52:13 +02:00
stylecheck fixes #20397; fixes stylecheck regression (#20398) 2022-09-21 15:04:33 -04:00
system fixes ptr to cstring warnings[backport] (#20848) 2022-11-16 10:22:51 +01:00
template fix #19149 Invalid codegen when returning var tuple from a template (#20762) 2022-11-06 11:49:34 +01:00
testament [Testament] Extend and document message testing aids (#19996) 2022-09-01 17:52:13 +02:00
testdata Add new self-signed 4096 bit certificate to testdata (#19758) 2022-05-08 11:54:04 +02:00
threads fixes a severe bug of testament (#20832) 2022-11-17 09:38:07 +08:00
tools fix #13790; ptr char (+friends) should not implicitly convert to cstring (#20761) 2022-11-24 07:49:23 +01:00
trmacros store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
tuples closes #16331; add testcase (#20730) 2022-11-02 12:01:36 +08:00
typerel closes #13618; add testcase (#20734) 2022-11-02 19:25:51 +08:00
types fixes #20807, refs #20450, regression with seq inference (#20818) 2022-11-12 05:27:51 +01:00
untestable Fix several memory leaks in the Postgres wrapper. (#20940) 2022-11-27 19:28:38 +01:00
usingstmt remove {.this.} pragma, deprecated since 0.19 (#20201) 2022-08-23 19:44:37 +02:00
valgrind testament: support disabled:osx as alias to disabled:macosx (#17124) 2021-02-22 11:01:15 +01:00
varres close #17636 (#17643) 2021-04-06 16:20:01 +02:00
varstmt
views Unpack mSlice tupleconstr for static openarrays (#20615) 2022-10-22 06:37:23 +02:00
vm fixes regression #20746; remove string copies for ORC booted compiler (#20776) 2022-11-07 14:36:43 +01:00
whenstmt fix #19426 compile error using when/elif/else and typedesc in template (#20550) 2022-10-21 09:26:46 +02:00
ast_pattern_matching.nim remove deprecated type pragma syntax, fix bugs that required it (#20199) 2022-09-03 09:52:13 +02:00
config.nims An unnamed break in a block now gives an UnnamedBreak warning (#20901) 2022-11-24 07:31:47 +01:00
dummy.txt
js.html
js.nim
m14634.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
mmaptest.nim Enable customizing PageShift to set PageSize for embedded targets (#19129) 2021-11-16 20:30:07 +01:00
readme.md Add a link for testament (#20923) 2022-11-26 21:48:37 +08:00
rectest.nim
stckovfl.nim
test_nimscript.nims move widestrs out of system (#20462) 2022-10-01 22:35:09 +02:00

This directory contains the test cases.

Each test must have a filename of the form: t*.nim

Note: Testament is only aware of tests under a directory (eg tests/foo/) and will ignore top-level tests like tests/tbar.nim.

Specs

Each test can contain a spec in a discard """ ... """ block.

Check out the parseSpec procedure in the specs module for a full and reliable reference

action

Specifies what action this test should take.

Default: run

Options:

  • compile - compiles the module and fails the test if compilations fails.
  • run - compiles and runs the module, fails the test if compilation or execution of test code fails.
  • reject - compiles the module and fails the test if compilation succeeds.

There are certain spec keys that imply run, including output and outputsub.

Categories

Each folder under this directory represents a test category, which can be tested by running koch tests pcat <category> (or cat to avoid parallel testing, which is slower).

The folder dll contains simple DLL tests.

The folder realtimeGC contains a test for validating that the realtime GC can run properly without linking against the nimrtl.dll/so.