Nim/tests
2021-01-29 15:14:19 +01:00
..
actiontable
alias
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
arc Finer analysis for array access (#16787) 2021-01-24 21:01:41 +01:00
arithm
array fix #16025 repr now consistent: does not insert trailing newline (#16034) 2020-11-19 12:12:51 -08:00
assert fix #16499 (#16514) 2021-01-04 18:27:58 +01:00
assign followup for #16717: minimized example + improved comment (#16721) 2021-01-15 01:09:58 +01:00
astoverload
astspec styleCheck: Fix error for sugar and std/with (#16176) 2020-12-02 20:48:16 +01:00
async use doAssert in tests (#16486) 2020-12-28 14:13:21 +01: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
borrow
casestmt nimout now consistently uses nimoutCheck (#16189) 2020-12-01 21:12:40 +01:00
ccgbugs Add testcase for #14880 (#16795) 2021-01-22 13:14:28 +01:00
ccgbugs2 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
clearmsg
closure 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
cnstseq
collections use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
compilepragma
compiler move asciitables to std/private/ (#16498) 2020-12-29 16:20:47 +01:00
compilerapi big steps torwards an efficient, simple IC implementation (#16543) 2021-01-02 07:30:39 +01:00
compilerfeatures
compiles
concat
concepts make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
constr
constraints
constructors
controlflow
converter close #7097 add testcase (#16682) 2021-01-11 15:13:13 +01:00
coroutines fix #15628 (#16387) 2021-01-21 17:31:47 +01:00
cpp close #4834 add testcase (#16649) 2021-01-09 11:54:26 +01:00
defaultprocparam
deprecated
deps Correct all eggs (#15906) 2020-11-10 21:53:25 +01:00
destructor use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
dir with space
discard
distinct fix #13517 (#16681) 2021-01-11 15:07:48 +01:00
distros
dll fix #16265; fix #13999 (HCR on OSX); cgen now does not line wrap string litterals (#16329) 2020-12-14 11:17:24 +01:00
effects fix manual to reflect reality for .nosideeffect (#16781) 2021-01-22 20:04:48 +01:00
enum fix #15145 (#15816) 2020-11-02 08:56:51 +01:00
errmsgs fix floats slice (#16853) 2021-01-29 12:26:36 +01:00
exception Make 'echo' raise IOErrors when appropriate (#16367) 2020-12-18 10:06:13 +01:00
exprs
fields use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
flags 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
float fix #16469 vm float constants: do not conflate -0.0 and 0.0 (#16470) 2020-12-27 14:35:01 +01:00
fragmentation
friends
gc follow #15860 clean cgi module (#16487) 2020-12-27 19:46:21 +01:00
generics Deprecate TaintedString (#15423) 2021-01-15 18:56:38 -08:00
gensym
global
ic Testament small fixes (#16788) 2021-01-22 07:50:28 +01:00
implicit
import_in_config
init
isolate
iter Deprecate TaintedString (#15423) 2021-01-15 18:56:38 -08:00
js fix noDecl => nodecl (#16760) 2021-01-20 11:08:42 +01:00
lent testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
let
lexer use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
lookups make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
macros fix broken => for typed procs with pragmas (#16190) 2020-12-01 12:01:36 +01:00
magics make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
manyloc addQuitProc => addExitProc (#16765) 2021-01-22 19:51:11 +01:00
metatype typetraits: make genericHead docs reflect reality; use runnableExamples (#16776) [backport:1.4] 2021-01-22 15:06:45 +01:00
method fix #16516 method dispatch for sink args (#16594) 2021-01-06 10:47:03 +00:00
misc 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
modules refactorings to prepare the compiler for IC (#15935) 2020-12-17 08:01:36 +01:00
namedparams
newconfig fix #16526 run config.nims before foo.nim.cfg (#16557) 2021-01-02 21:41:44 +01:00
nimble testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
nimdoc fix #15916 (#15917) [backport] 2020-11-12 09:31:35 +01:00
niminaction use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
notnil
objects remove some noises in tests (#16448) 2020-12-27 14:45:57 +01:00
objvariant use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
openarray
osproc use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
overflw Fix #15706 (#15846) 2020-11-07 08:00:41 +00:00
overload make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
package_level_objects
parallel
parser use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
pragmas disable hint:processing in tests (#16713) 2021-01-14 10:19:20 +01:00
proc testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
procvar
range
rational
realtimeGC fixed article duplication typos (#16216) 2020-12-02 09:15:29 +01:00
sets use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
showoff
specialops make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
statictypes Add test for static proc/lambda params (#16584) 2021-01-04 18:41:02 +01:00
stdlib add lost functions (#16843) 2021-01-29 15:14:19 +01:00
stmt fix #15972 (#15994) 2020-11-18 00:14:14 +00:00
strictnotnil Nil type check implementation (#15287) 2020-12-29 10:31:11 +01:00
system fix #16650 (#16660) 2021-01-10 21:51:29 +00:00
template Add testcase for #5993 (#16789) 2021-01-22 02:11:21 +01:00
testament fix testament regression: installed testament works again with testament r path (#16767) 2021-01-20 14:04:08 +01:00
testdata
threads
tools
trmacros
tuples cleanup old codes (#16173) 2020-11-30 09:41:50 +08:00
typerel
types use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
untestable nim-gdb.py fixes mostly for nimsuggest debugging (#16479) 2020-12-30 15:02:51 +01:00
usingstmt
valgrind
varres testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
varstmt
views ensure the Nim compiler works with --experimental:strictFuncs --experimental:views [backport:1.4] (#15737) 2020-10-26 21:08:57 +01:00
vm close #8015: const array indexing zeroes data in object variants at runtime (#16782) 2021-01-21 11:11:42 +01:00
ast_pattern_matching.nim
config.nims disable hint:processing in tests (#16713) 2021-01-14 10:19:20 +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
readme.md
rectest.nim
stckovfl.nim
test_nimscript.nims doAssertRaises improvements; nimscript supports except Exception as e (#15765) 2020-11-12 09:25:41 +01: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.

cmd

Specifies the Nim command to use for compiling the test.

There are a number of variables that are replaced in this spec option:

  • $target - the compilation target, e.g. c.
  • $options - the options for the compiler.
  • $file - the filename of the test.
  • $filedir - the directory of the test file.

Example:

discard """
  cmd: "nim $target --nimblePath:./nimbleDir/simplePkgs $options $file"
"""

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. It includes a C client and platform specific build files for manual compilation.