Nim/tests
alaviss 56b3d422b0
typetraits: features and fixes (#14791)
* typetraits: add support for nnkTypeOfExpr

* typetraits: don't wrap typedesc symbols in StaticParam

* typetraits: add nested generics support to genericParams

* typetraits: make genericParams understand array[I, T] whackiness

Also moved tests to ttypetraits

* typetraits: clarify comment on genericParams
2020-06-30 15:25:53 +02:00
..
actiontable
alias
align fixes #13122 (#13126) 2020-01-13 14:11:51 +01:00
ambsym
arc Fix #14568 (#14583) 2020-06-07 23:32:41 +02:00
arithm fix operators containing percent for VM usage (#13536) 2020-03-11 01:01:25 +01:00
array disallow typedesc in arrays & move existing checks to types.typeAllowedAux (#13261) 2020-05-29 11:48:15 +02:00
assert init checks and 'out' parameters (#14521) 2020-06-23 10:53:57 +02:00
assign fix rtti sizeof for varargs in global scope (#13125) [backport] 2020-01-13 10:17:21 +01:00
astoverload
astspec Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
async Fix asyncdispatch drain behavior (#14820) (#14838) 2020-06-30 15:23:53 +02:00
bind Add testcases for #11811 and #14315 (#14726) 2020-06-19 14:56:38 +02:00
borrow Add testcase for #14440 (#14771) 2020-06-23 14:17:12 +02:00
casestmt [cleanups] doassert => doAssert; mark deadcode (#14711) 2020-06-17 20:25:25 -07:00
ccgbugs warn about observerable stores but don't prevent them for 1.2.2 [backport:1.2]; refs https://github.com/nim-lang/RFCs/issues/230 (#14510) 2020-05-30 19:38:51 +02:00
ccgbugs2 Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
clearmsg
closure Make the fields of times.DateTime private (#14197) 2020-05-06 12:20:34 +02:00
cnstseq
collections Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
compilepragma
compiler trunner was not actually being tested in non-CTFFI mode; minor testament cleanups (#14377) 2020-05-19 09:41:31 +02:00
compilerapi hotfix: make tcompilerapi green again 2020-04-30 22:48:10 +02:00
compilerfeatures new compiler feature: --expandMacro 2019-05-29 20:47:28 +02:00
compiles delete list comprehension (#12392) 2019-11-22 19:57:43 +01:00
concat
concepts Clean out Deprecated proc (#14797) 2020-06-29 09:33:07 +02:00
constr
constraints
constructors Turn some of the errors back into warnings 2020-04-01 19:38:44 +02:00
controlflow Make unreachable code a warning instead of an error (#14816) 2020-06-29 08:49:53 +02:00
converter addQuitProc now works with closures, and c, js(node/browser) backend; fix some bugs in testament (#14342) 2020-06-16 11:43:48 +02:00
coroutines Close#5586 (#14682) 2020-06-16 16:24:26 +02:00
cpp fix typos and deprecation warnings for tconvariancerules.nim (#13772) 2020-03-27 08:36:21 +01:00
defaultprocparam
deprecated
deps Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
destructor Fix #14647 (#14776) 2020-06-28 17:47:47 +02:00
dir with space
discard improve the 'has to be discarded' error message 2020-05-02 22:31:19 +02:00
distinct fixes #11715 (#11721) 2019-07-13 07:55:56 +02:00
distros fix tdistros test which was failing on Nightlies 2020-04-28 15:59:32 +02:00
dll CI openbsd: 3x batching via NIM_TESTAMENT_BATCH ; overall CI finishes in 21m instead of 34m (#14851) 2020-06-30 14:21:30 +02:00
effects init checks and 'out' parameters (#14521) 2020-06-23 10:53:57 +02:00
enum fix enumtostr crash for enum-range (#13035) 2020-01-05 09:18:14 +01:00
errmsgs Implement rendering of []=, {}, {}= braces (#14539) 2020-06-01 19:56:17 +02:00
exception fix #10343 (#14789) 2020-06-24 18:00:35 +02:00
exprs update tests that tested for the 'discard' error messages 2020-05-02 22:31:19 +02:00
fields
flags
float Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
fragmentation
friends
gc Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
generics Add test-cases to some fixed issues to close them (#14795) 2020-06-24 20:38:08 -07:00
gensym fixes yet another gensym regression (#12145) 2019-09-06 00:45:00 +02:00
global
ic Incremental compilation (IC): Improvements (#11881) 2019-08-08 08:41:05 +02:00
implicit
import_in_config
init init checks and 'out' parameters (#14521) 2020-06-23 10:53:57 +02:00
iter fix #13739 (#13742) 2020-04-07 14:42:59 +02:00
js fix #14576 addr of param (including for lent) now works with nim js (#14577) 2020-06-06 20:15:24 +02:00
lent fixes #14498 [backport:1.2] (#14503) 2020-05-30 15:32:31 +02:00
let Allow let to not have value when using importc (#14258) 2020-05-12 20:28:18 +02:00
lexer
lookups implement the 'bind' statement for generics, it was an oversight that this was never implemented (#14584) 2020-06-07 09:55:56 +02:00
macros add legacy workaround; improve test so that it actually tests for the bugfix 2020-06-19 09:53:06 +02:00
magics close #12746; minor cleanup (#14379) 2020-05-17 13:28:18 +02:00
manyloc Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
metatype typetraits: features and fixes (#14791) 2020-06-30 15:25:53 +02:00
method Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
misc Add test-cases to some fixed issues to close them (#14795) 2020-06-24 20:38:08 -07:00
modules Add testcase for #4796 (#14784) 2020-06-25 15:12:30 +02:00
namedparams fixes #12196 2019-09-16 12:12:44 +02:00
newconfig --hint:processing (+friends) is now supported and means --hint:processing:on, like all other bool flags (#14271) 2020-05-08 18:54:16 +02:00
nimble tnimblepathdollarfail.nim -> tests/nimble/tnimblepathdollar_fault to reduce false positives when searching for fail in CI logs (#14450) 2020-05-25 13:54:30 -07:00
nimdoc fix bug in semgnrc: runnableExamples should not semcheck, even with > 1 arg (#14768) 2020-06-23 10:06:36 +02:00
niminaction Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
notnil Add tests for #8481, #6490 and #4061 (#14083) 2020-04-23 19:52:33 +02:00
objects Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
objvariant Better case coverage error message for alias and range enum (#12913) 2019-12-18 10:29:01 +01:00
openarray clean up deprecated stuff and unused imports in tests (#13059) 2020-01-07 09:49:08 +01:00
osproc testament: generic N-fold batching: windows CI 37mn=>16m (#14823) 2020-06-27 16:51:17 +02:00
overflw Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
overload exp. features now in correct manual, closes #11932 (#14195) 2020-05-02 22:30:08 +02:00
package_level_objects
parallel #12103 - CI for OpenBSD (#12105) 2020-04-21 15:05:21 +02:00
parser make from an operator (#14241) 2020-05-08 07:54:46 +02:00
pragmas add test for define, undef (#14443) 2020-05-25 11:17:25 +02:00
proc allow typed/untyped in magic procs (#12911) 2019-12-17 11:07:32 +01:00
procvar
range Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
rational Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
realtimeGC
sets tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of tests (#13498) [backport] 2020-02-26 22:07:09 +01:00
showoff Revert "printing float values will have one more digit. (#13276) [backport]" (#13363) 2020-02-08 09:30:24 +01:00
specialops
statictypes fix #14802 (#14803) 2020-06-25 08:00:19 +02:00
stdlib add debug fmt string like python's (#14808) 2020-06-30 15:21:37 +02:00
system Clean out Deprecated proc (#14797) 2020-06-29 09:33:07 +02:00
template Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
testament misc testament cleanups (#14764) 2020-06-23 10:53:03 +02:00
testdata
threads faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tools new feature: --staticBoundChecks:on to enforce static array index checking (#10965) 2020-03-18 14:25:10 +01:00
trmacros
tuples fixes #14112, tests for #12892, #12671, #11697 (#14125) 2020-04-26 10:12:16 +02:00
typerel disallow typedesc in arrays & move existing checks to types.typeAllowedAux (#13261) 2020-05-29 11:48:15 +02:00
types fix #14007 (#14012) [backport] 2020-04-18 16:15:17 +02:00
untestable Deprecate and/or remove ospaths (#14767) 2020-06-23 10:51:33 +02:00
usingstmt
valgrind attempt to add valgrind support to the CIs and testament (#12646) 2019-11-18 09:10:48 +01:00
varres fix #13848: make var result work with nim cpp (#13959) 2020-04-13 14:16:06 +02:00
varstmt
vm Remove deprecated stuff from stdlib (#14699) 2020-06-17 15:25:02 +02:00
ast_pattern_matching.nim
config.nims fix #14320 (tasyncawait.nim is recently very flaky) + avoid hardcoding service ports everywhere + flakyAssert (#14327) 2020-05-13 11:05:47 +02:00
dummy.txt
js.html
js.nim
m14634.nim fix #13166 tioselectors flaky test on freebsd+OSX (#14634) 2020-06-12 21:19:23 -07:00
mmaptest.nim Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
readme.md Update link to parseSpec proc 2020-06-28 00:13:54 +02:00
rectest.nim
stckovfl.nim
test_nimscript.nims cleanup tests/test_nimscript.nims (#14686) 2020-06-16 14:38:30 -07: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.