Nim/tests
2018-02-19 13:19:43 +01: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 better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types 2018-02-10 20:55:21 +01:00
assert Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
assign
astoverload
async Merge pull request #7023 from yglukhov/unify-async 2018-01-17 15:06:32 +00:00
benchmarks
bind make more tests green 2018-02-10 20:55:22 +01:00
borrow
caas
casestmt make more tests green 2018-02-10 20:55:22 +01:00
ccgbugs fixes #6960 2018-02-11 13:55:56 +01:00
clearmsg make more tests green 2018-02-10 20:55:22 +01:00
closure make more tests green 2018-02-10 20:55:22 +01:00
cnstseq
collections Fixed mutex usage in SharedList and SharedTable. Closes #6988 (#6990) 2017-12-31 09:28:51 +01:00
compiles Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
concat
concepts better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types 2018-02-10 20:55:21 +01:00
constr the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
constraints make more tests green 2018-02-10 20:55:22 +01:00
constructors Fixes #5965 (#6237) 2017-08-14 17:43:39 +02:00
controlflow
converter
coroutines attempt to make travis OSX tests green and mandatory 2017-03-29 10:14:03 +02:00
cpp Alternative fix for #4910 that covers #6892; fixes #6892 (#6938) 2017-12-17 23:56:21 +01:00
defaultprocparam
deprecated
destructor more progress on destructors; removed old destructor based code as it proved confusing 2017-12-01 01:52:00 +01:00
dir with space
discard more chatty error message for the 'discard' checking 2018-02-05 16:49:06 +01:00
distinct
dll
effects make more tests green 2018-02-10 20:55:22 +01:00
enum
errmsgs fixes #6186 2018-02-11 14:52:26 +01:00
exception genTryCpp to catch by Nim type, ready for first review (#7196) 2018-02-12 21:23:34 +01:00
exprs fixes #6980 2017-12-27 21:26:37 +01:00
fields Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
float Fix for isssue in parseBiggestFloat #7060 (#7061) 2018-01-11 01:57:20 +01:00
fragmentation tfragment_gc test: make more robust 2018-02-13 13:11:19 +01:00
friends
gc Fix gc tests for BoehmGC (#7094) 2018-01-18 09:04:32 +01:00
generics make more tests green 2018-02-10 20:55:22 +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
init
iter make more tests green 2017-11-01 00:56:03 +01:00
js Fixes #6741 (#7131) 2018-01-25 04:26:40 +01:00
lent basic 'lent T' test works 2018-01-21 03:04:22 +01:00
let make more tests green 2018-02-10 20:55:22 +01:00
lexer make tests green again 2017-11-05 13:02:46 +01:00
lookups
macros make tests green again 2018-02-03 07:57:47 +01:00
magics the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
manyloc make more tests green 2018-02-10 20:55:22 +01:00
metatype make more tests green 2018-02-10 20:55:22 +01:00
method added missing test for methods 2017-09-28 21:52:23 +02:00
misc fixes #3985 2018-02-10 21:20:48 +01:00
modules fixes #6965 2017-12-28 00:50:45 +01:00
namedparams make more tests green 2018-02-10 20:55:22 +01:00
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 avoid creating temporary in genObjConstr if possible (#7032) 2018-01-11 02:01:51 +01:00
objvariant make more tests green 2018-02-10 20:55:22 +01:00
openarray
osproc Refactored version of execProcesses with test. 2017-11-28 14:03:09 +02:00
overflw
overload better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types 2018-02-10 20:55:21 +01:00
package_level_objects new feature: package level objects 2017-10-29 07:54:39 +01:00
parallel GC test workaround: use a lock for 'echo' for Windows 2017-12-07 13:14:28 +01:00
parser make tests green again 2017-11-19 20:09:38 +01:00
pragmas Custom pragmas in procs bug fix (#7086) 2018-01-18 10:38:55 +01: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 Fix longgc category tests (#7095) 2018-01-22 15:08:27 +01:00
rodfiles
seq
sets Add counterpart to containsOrIncl for excl (#6360) 2017-09-15 10:49:32 +02:00
showoff Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
specialops dotops: add a simple object delegation test 2017-12-01 02:05:48 +01:00
statictypes close #1051 2017-06-20 11:29:42 +02:00
stdlib Fix json.to for types with generic parameters 2018-02-11 23:15:04 +01:00
system Fixes #7121 (#7148) 2018-01-31 16:38:37 +01:00
template Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
testament disable symbol file tests for the old symbol file implementation 2018-02-19 13:19:43 +01:00
testdata
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 make tests green again 2017-12-15 13:24:47 +01:00
typerel better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types 2018-02-10 20:55:21 +01:00
types Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
untestable Add OpenSSL 1.1.0 support #5000 2017-12-28 21:57:43 +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 add tests for integer casting in VM. 2017-12-30 10:30:40 +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.