Nim/tests
2018-12-27 22:40:40 +01: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 testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01:00
assert require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
assign require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
astoverload
async C++: make async tests green on Windows 2018-12-21 22:03:41 +01:00
bind lots of small changes 2018-12-11 21:23:22 +01:00
borrow require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
casestmt require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
ccgbugs lots of small changes 2018-12-11 21:23:22 +01:00
clearmsg require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
closure attempt to make travis green 2018-12-11 21:23:25 +01:00
cnstseq require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
collections testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01: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 megatest checks output and nimout 2018-12-11 21:23:22 +01:00
constr Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01: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 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
coroutines fix coro test 2018-11-23 11:58:29 +01:00
cpp join simple test 2018-11-23 11:58:32 +01:00
defaultprocparam updated tests to be executed 2018-11-23 11:58:28 +01:00
deprecated require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
deps testament megatest: furher refactorings making more tests green 2018-12-11 21:23:24 +01:00
destructor testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01:00
dir with space updated tests to be executed 2018-11-23 11:58:28 +01:00
discard lots of small changes 2018-12-11 21:23:22 +01:00
distinct lots of small changes 2018-12-11 21:23:22 +01:00
dll activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
effects require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
enum require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
errmsgs fixes #10101 (#10103) 2018-12-27 22:40:09 +01:00
exception require errormsg to be specified before file. 2018-12-11 21:23:21 +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 Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
fragmentation tests: disable flaky tests for now; closes #9421 2018-10-18 12:12:15 +02:00
friends
gc make thavlak and tmarkerproc_regression tests take fewer iterations in order to speedup the CIs 2018-10-17 13:20:45 +02:00
generics megatest: make it green on Linux 2018-12-11 21:23:25 +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 Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
js Fixed insert for nil seq in js (#10068) 2018-12-21 22:45:20 +01:00
lent
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 megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
magics megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
manyloc make tests green; better output for when megatest execution fails 2018-12-11 21:23:24 +01:00
metatype Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
method testament megatest: furher refactorings making more tests green 2018-12-11 21:23:24 +01:00
misc use anon structs and unions for a much better debug experience (#10055) 2018-12-20 11:44:26 +01:00
modules fixes #9994 2018-12-15 14:30:21 +01: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 lots of small changes 2018-12-11 21:23:22 +01:00
notnil require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
objects Merge pull request #8748 from LemonBoy/when-in-objects 2018-12-12 18:19:52 +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 megatest checks output and nimout 2018-12-11 21:23:22 +01:00
package_level_objects
parallel lots of small changes 2018-12-11 21:23:22 +01:00
parser require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
pragmas fixes #10101 (#10103) 2018-12-27 22:40:09 +01:00
proc proc does not take untyped/typed as argument (#9981) 2018-12-19 16:18:57 +01:00
procvar Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
range require errormsg to be specified before file. 2018-12-11 21:23:21 +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
seq Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
sets require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
showoff
specialops
statictypes lots of small changes 2018-12-11 21:23:22 +01:00
stdlib Add ability to sample elements from openArray according to a weight array (#10072) 2018-12-23 12:23:20 +00:00
system testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01:00
template Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
testament lots of testament bug fixes and improvements: (#10044) 2018-12-20 11:49:32 +01:00
testdata
threads lots of small changes 2018-12-11 21:23:22 +01:00
trmacros require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tuples Const tuple unpacking: add tests (#10100) 2018-12-27 22:40:40 +01:00
typerel lots of small changes 2018-12-11 21:23:22 +01:00
types testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01:00
untestable lots of small changes 2018-12-11 21:23:22 +01: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 add getCurrentCompilerExe to vmops (eg allows to get nim compiler at CT); add tests for vmops (#9925) 2018-12-18 09:07:12 +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 deprecated ospaths (#9665) 2018-11-09 16:36:49 +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.