Nim/tests
2019-04-29 13:36:00 +02:00
..
actiontable Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
alias
ambsym require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
arithm Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
array close #3899 by adding test case (#10424) 2019-01-23 08:44:19 +01:00
assert move system.dollars in a separate file (#10829) 2019-03-13 15:59:09 +01:00
assign require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
astoverload
astspec add tastspec (and ast_pattern_matching) (#10863) 2019-03-19 11:45:29 +01:00
async better docs: osproc (#10708) 2019-02-19 17:25:03 +01:00
bind Remove deprecated modules (asyncio, sockets, ftpclient) (#10401) 2019-01-22 16:06:44 +01:00
borrow require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
casestmt Print missing case labels (#10600) 2019-02-09 07:36:30 +01:00
ccgbugs Fix varargs int32 (#11054) 2019-04-18 20:53:57 +02:00
clearmsg require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
closure Remove deprecated modules (asyncio, sockets, ftpclient) (#10401) 2019-01-22 16:06:44 +01:00
cnstseq require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
collections faster CountTable sort(), optional SortOrder (#11010) 2019-04-16 09:42:54 +02:00
compiler improve formatting in assertEquals 2019-01-14 17:00:54 -08:00
compilerapi megatest can be executed 2018-12-11 21:23:21 +01:00
compiles make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
concat
concepts make megatest work again 2019-04-02 08:23:13 +02:00
constr fixes #10943 (#10947) 2019-04-05 14:50:57 +02:00
constraints require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
constructors require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
controlflow Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
converter 32 bit fixes (#10608) 2019-02-12 22:00:31 +01:00
coroutines disable flaky coroutines test 2019-02-09 07:41:19 +01:00
cpp fixes #10765 (#10993) [backport] 2019-04-11 13:51:51 +02:00
defaultprocparam updated tests to be executed 2018-11-23 11:58:28 +01:00
deprecated fix #8063 by adding a testcase for: Deprecation warnings for enum values print twice (#10508) 2019-01-31 11:44:11 +01:00
deps testament megatest: furher refactorings making more tests green 2018-12-11 21:23:24 +01:00
destructor added unown test case 2019-04-29 13:36:00 +02:00
dir with space fixes #10042 (allow spaces in import) (#10504) 2019-01-31 08:20:00 +01:00
discard revert discardable transformation (#10905) 2019-04-21 09:57:53 +02:00
distinct lots of small changes 2018-12-11 21:23:22 +01:00
dll improvements on the hot code reloading support (#10892) 2019-03-23 14:48:47 +01:00
effects fixes a critical GC safety inference bug (#10615) 2019-03-05 19:54:44 +01:00
enum add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
errmsgs Lineinfo fix (#10871) 2019-03-21 06:54:42 +01:00
exception revive #10228 (fix #9880) (#10610) 2019-02-10 22:07:11 +01:00
exprs require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
fields Merge tests into a larger file (part 2 of ∞) (#9335) 2018-10-13 14:58:31 +02:00
flags require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
float fix #10305 nim cpp is now nan-correct at CT (#10310) 2019-01-15 14:50:28 +01:00
fragmentation tests: disable flaky tests for now; closes #9421 2018-10-18 12:12:15 +02:00
friends
gc ported havlak and gcbench benchmarks to work with --gc:regions 2019-01-19 12:48:39 +01:00
generics 32 bit fixes (#10608) 2019-02-12 22:00:31 +01:00
gensym
global require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
implicit lots of small changes 2018-12-11 21:23:22 +01:00
import_in_config
init activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
iter add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
js implement system.default for the JS target 2019-03-05 19:58:54 +01:00
lent make test green 2019-03-05 05:53:28 +01:00
let require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
lexer megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
lookups updated tests to be executed 2018-11-23 11:58:28 +01:00
macros add progmas to params of macros.newProc (#11025) 2019-04-27 12:22:02 +01:00
magics megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
manyloc move assertions and iterators out of system.nim (#10597) 2019-03-07 00:49:39 +01:00
metatype move system.dollars in a separate file (#10829) 2019-03-13 15:59:09 +01:00
method multi-methods need to be explicitly enabled (#10856) 2019-03-18 08:21:37 +01:00
misc sizeof alignof offsetof macros api (#10855) 2019-03-19 08:23:00 +01:00
modules remove the restriction that module names need to be unique per Nimble… (#11064) 2019-04-20 15:19:02 +02:00
namedparams require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
newconfig cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
nimble
niminaction fix sdl_test test that failed in CI cpp mode (#10314) 2019-01-15 15:17:52 -08:00
notnil require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
objects add tests, closes #3012, closes #7244 2019-02-27 12:39:35 +01:00
objvariant fixes #10033 [backport] 2018-12-22 18:39:20 +01:00
openarray require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
osproc make tests green again 2018-12-11 21:23:26 +01:00
overflw require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
overload fixes #9149 [backport] 2019-01-29 14:31:43 +01:00
package_level_objects
parallel make tests green again 2019-03-07 17:11:22 +01:00
parser revert parser stmtListExpr (#11007) 2019-04-17 11:55:41 +02:00
pragmas Fix astdef typ deref (#10245) 2019-04-05 16:43:36 +02:00
proc fixes #10838 (#10841) 2019-03-18 11:04:01 +01:00
procvar Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
range Tighten the conversion from tyRange to scalar types (#10495) 2019-02-23 11:52:52 +01:00
rational require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
realtimeGC WIP, most tests are now skipped 2018-12-11 21:23:18 +01:00
rodfiles remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
seq Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
sets remove shadow warning, fixes #10732 (#11039) 2019-04-17 11:54:51 +02:00
showoff
specialops
statictypes fix #10339 by returning type attached to nkEmpty (#10370) 2019-01-23 11:17:32 +01:00
stdlib fixes another regression; the behaviour of 'array' formatting was changed 2019-04-15 08:20:28 +02:00
system disable talloc2 on 32 bits (#10656) 2019-02-13 08:04:06 +01:00
template add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
testament lots of testament bug fixes and improvements: (#10044) 2018-12-20 11:49:32 +01:00
testdata
threads fixes #10795 2019-03-06 10:15:27 +01:00
trmacros fixes #7524 2019-01-14 12:15:40 +01:00
tuples Fixes #10727. (#10728) 2019-02-25 11:21:14 +01:00
typerel Restrict ptr/ref to ptr/ref implicit conversion (#10411) 2019-01-22 11:17:20 +01:00
types Generic tuple recursion fix (#11115) 2019-04-28 10:11:41 +02:00
untestable Detect local "primary" IP address 2019-03-17 16:58:27 +00:00
usingstmt Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
varres require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
varstmt Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
vm Compiler plugin for implementing incremental computation in user space (#10819) 2019-04-11 23:09:11 +02:00
ast_pattern_matching.nim add tastspec (and ast_pattern_matching) (#10863) 2019-03-19 11:45:29 +01:00
config.nims followup on #10573: prevent common user config to interfere with testament (excessiveStackTrace) (#10590) 2019-02-07 12:29:31 +01:00
dummy.txt Remove install.txt and readme.txt (#9521) 2018-10-28 13:36:52 +01:00
js.html
js.nim
mmaptest.nim
readme.md Testament pre parallel (#9137) 2018-10-12 17:27:47 +02:00
rectest.nim
stckovfl.nim
test_nimscript.nims remove subexes 2019-01-10 09:17:12 +01:00

This directory contains the test cases.

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

Note: Tests are only compiled by default. In order to get the tester to execute the compiled binary, you need to specify a spec with an action key (see below for details).

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: compile

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 cat <category>.

The folder rodfiles contains special tests that test incremental compilation via symbol files.

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.