Nim/tests
2017-11-28 14:03:09 +02:00
..
actiontable
alias Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
ambsym
arithm breaking change: 'and' and 'mod' do not produce a subrange type anymore; fixes #5854 2017-10-30 00:27:30 +01:00
array fixes #6692 2017-11-05 02:51:32 +01:00
assert Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
assign
astoverload
async Async upcoming (#6585) 2017-11-22 15:43:10 +01:00
benchmarks
bind Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
borrow
caas
casestmt the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
ccgbugs fixes #6724 2017-11-19 00:37:36 +01:00
clearmsg lift parameter-less do block to lambdas 2017-04-10 23:58:05 +03:00
closure bugfix: detect captures in non-closure inner procs 2017-11-03 18:05:14 +01:00
cnstseq
collections Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
compiles Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
concat
concepts make tests green again 2017-11-21 12:29:58 +01:00
constr the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
constraints
constructors Fixes #5965 (#6237) 2017-08-14 17:43:39 +02:00
controlflow
converter fixes #4537 2016-08-02 14:53:21 +02:00
coroutines attempt to make travis OSX tests green and mandatory 2017-03-29 10:14:03 +02:00
cpp Fixes #5979 (#5980) 2017-11-19 02:32:39 +01:00
defaultprocparam
deprecated
destructor destructors: supportsCopyMem finally works for recursive types 2017-10-26 00:55:23 +02:00
dir with space
discard Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
distinct make tests on Windows green 2017-01-31 23:05:36 +01:00
dll
effects make tests green again 2017-10-15 09:32:53 +02:00
enum Fixes #5062 (#5527); JS: holes in enums 2017-03-15 10:33:37 +01:00
errmsgs added a test case for bug #6776 2017-11-18 23:15:35 +01:00
exception Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
exprs closes #6166 2017-11-18 14:18:00 +01:00
fields implemented undocumented '.liftLocals' feature 2017-11-02 10:42:19 +01:00
float Added 'lenient ops' module (#6754) 2017-11-21 13:22:27 +01:00
friends
gc fix 2017-07-24 23:21:51 +02:00
generics make tests green again 2017-11-18 23:03:16 +01:00
gensym equality check on NimSym has now support in the VM; refs #6139 2017-09-03 01:15:40 +02:00
global
implicit
import_in_config fixes a regression that caused --import in a config file to break things 2016-08-29 11:33:41 +02:00
init
iter make more tests green 2017-11-01 00:56:03 +01:00
js fixes #6753 2017-11-22 12:58:03 +01:00
let
lexer make tests green again 2017-11-05 13:02:46 +01:00
lookups fixes #4353 2016-08-04 19:36:13 +02:00
macros make tests green again 2017-11-23 14:37:53 +01:00
magics the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
manyloc Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
metatype remove ArrayDummySize with unchecked arrays (#5818) 2017-08-28 15:44:35 +02:00
method added missing test for methods 2017-09-28 21:52:23 +02:00
misc make tests green again 2017-11-21 12:29:58 +01:00
modules Add sections (type, var, let, const, using) support for reorder pragma (#6326) 2017-10-28 11:33:35 +02:00
namedparams
newconfig fixes #6327 2017-09-05 09:03:09 +02:00
nimble Implement .nimble-link files in the compiler and add tests for them. 2017-09-02 15:28:25 +01:00
niminaction @dom96's comments: remove bountysource, revert configurator change. 2017-10-14 16:03:50 +03:00
notnil fixes #3993 2017-11-23 03:12:09 +01:00
objects fixes #6294 2017-09-05 01:03:23 +02:00
objvariant Add test for objvariant construction order 2017-09-09 15:45:19 -07:00
openarray fixed #2240 and #3586 2016-01-05 07:52:56 +07:00
osproc Refactored version of execProcesses with test. 2017-11-28 14:03:09 +02:00
overflw
overload Fix compiler crash (#6773) (#6774) 2017-11-18 09:21:37 +01:00
package_level_objects new feature: package level objects 2017-10-29 07:54:39 +01:00
parallel Channels can now block depending on maxItems (#6153) 2017-07-31 20:06:55 +02:00
parser make tests green again 2017-11-19 20:09:38 +01:00
pragmas Add sections (type, var, let, const, using) support for reorder pragma (#6326) 2017-10-28 11:33:35 +02:00
proc
procvar
range Fix typo in new test 2017-11-01 18:13:27 +03:00
rational make tests green again 2017-11-18 23:03:16 +01:00
realtimeGC
rodfiles updated test case 2016-08-27 13:26:16 +02:00
seq fixes #4973 2017-02-01 12:09:24 +01:00
sets Add counterpart to containsOrIncl for excl (#6360) 2017-09-15 10:49:32 +02:00
showoff Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
specialops Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
statictypes close #1051 2017-06-20 11:29:42 +02:00
stdlib added a warning that the .deprecate statement is unreliable for routines 2017-11-21 11:27:35 +01:00
system fixes #6710 2017-11-08 15:45:26 +01:00
template Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
testament Async upcoming (#6585) 2017-11-22 15:43:10 +01:00
testdata Fix for #5134 (parseJson(string) should fail on leftover data) (#5203) 2017-01-11 06:50:18 +01:00
threads the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
trmacros Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tuples Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
typerel Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
types fixes #5521 object variants superclass trigger bad codegen (#6120) 2017-11-19 13:12:26 +01:00
untestable Add comments on "untestable" tests directory 2017-11-03 20:58:32 +00:00
usingstmt Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
varres the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
varstmt
vm make tests green again 2017-11-19 20:09:38 +01:00
benchmark.nim
js.html
js.nim
mmaptest.nim
readme.md Add readme to tests. Add fileDir option to testament & create nimble test. 2017-09-02 15:03:39 +01:00
rectest.nim
stckovfl.nim
test_nimscript.nims bugfix: make 'macros' module available for nimscript 2017-11-14 23:26:46 +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.