Nim/tests
2018-10-18 12:12:15 +02:00
..
actiontable Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
alias
ambsym
arithm Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
array Relax the restrictions on the index types (#9412) 2018-10-18 11:08:05 +02:00
assert correctly render AST in doAssert/assert condition: fixes #8518; refs #9301 (#9332) 2018-10-14 00:17:10 +02:00
assign make tests green again 2018-10-13 08:39:56 +02:00
astoverload
async make some tests faster (#9413) 2018-10-17 19:46:42 +02:00
benchmarks
bind Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
borrow
caas
casestmt Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
ccgbugs make thavlak and tmarkerproc_regression tests take fewer iterations in order to speedup the CIs 2018-10-17 13:20:45 +02:00
clearmsg make more tests green 2018-02-10 20:55:22 +01:00
closure Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
cnstseq Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
collections make some tests faster (#9413) 2018-10-17 19:46:42 +02:00
compilerapi test case for #9180 and re-enables the disabled tcompilerapi test (#9181) 2018-10-11 09:44:35 +02:00
compiles Allow taking address of skForVar variables (#8632) 2018-08-14 21:28:14 +02:00
concat
concepts Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02: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 make tests green again 2018-05-02 13:34:54 +02:00
controlflow Merge tests into a larger file (part 2 of ∞) (#9335) 2018-10-13 14:58:31 +02:00
converter Converters to take into account constraints. Fixes #7520 (#8593) 2018-08-13 15:02:20 +02:00
coroutines
cpp fixes #9222 (#9224) 2018-10-09 15:19:21 +02:00
defaultprocparam
deprecated More robust handling of deprecated pragmas (#8696) 2018-08-21 15:07:44 +02:00
deps make tests green again 2018-09-14 20:10:46 +02:00
destructor DFA: implement exception handling properly 2018-10-14 17:36:55 +02:00
dir with space
discard fixes #9076 2018-09-26 11:32:02 +02:00
distinct fixes #2760 2018-10-15 10:43:56 +02:00
dll
effects make tests green again 2018-07-05 19:14:18 +02:00
enum fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786) 2018-10-14 01:16:04 +02:00
errmsgs fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786) 2018-10-14 01:16:04 +02:00
exception Merge branch 'Fixes-7845' of https://github.com/cooldome/Nim into cooldome-Fixes-7845 2018-10-15 11:50:12 +02:00
exprs make tests green again 2018-08-10 17:27:30 +02:00
fields Merge tests into a larger file (part 2 of ∞) (#9335) 2018-10-13 14:58:31 +02:00
flags Fixes #802, #803 and #3775 - genscript issues (#7677) 2018-04-25 10:52:32 +02:00
float update test 2018-04-29 23:26:21 +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 make some tests faster (#9413) 2018-10-17 19:46:42 +02:00
gensym
global Make static blocks introduce their own scope 2018-06-24 18:27:40 +02:00
implicit Merge tests into a larger file (part 2 of ∞) (#9335) 2018-10-13 14:58:31 +02:00
import_in_config
init Extend init variable tracking to tuple assignments (#8321) 2018-07-17 17:50:05 +02:00
iter Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
js Field checks for everybody (#8957) 2018-10-09 19:54:12 +02:00
lent basic 'lent T' test works 2018-01-21 03:04:22 +01:00
let Revert #7964 2018-09-21 18:59:46 +02:00
lexer Unicode escape in string literals (#9390) 2018-10-17 00:14:22 +02:00
lookups
macros merge macros tests (#9367) 2018-10-14 17:08:42 +02:00
magics Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
manyloc make nake test compile again 2018-08-22 17:34:16 +02:00
metatype Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
method Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
misc fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786) 2018-10-14 01:16:04 +02:00
modules fix test 2018-09-04 18:25:54 -05:00
namedparams make more tests green 2018-02-10 20:55:22 +01:00
newconfig travis: run 'koch testinstall' on OSX 2018-09-18 15:27:54 +02:00
nimble
niminaction Adds smaller code samples from Chapters 1-3 to the tester. 2018-06-17 00:12:51 +01:00
notnil make tests green again 2018-08-13 23:16:03 +02:00
objects Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
objvariant make tests green again 2018-05-14 21:38:18 +02:00
openarray Always check the deduced type validity for result 2018-09-17 15:33:44 +02:00
osproc merged #8624 manually; fixes #8442; closes #8575 2018-08-31 11:19:42 +02:00
overflw Added more tests to toverflw 2018-06-15 19:46:17 +03:00
overload Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
package_level_objects new feature: package level objects 2017-10-29 07:54:39 +01:00
parallel make some tests faster (#9413) 2018-10-17 19:46:42 +02:00
parser Fix #8126 (#8712) 2018-08-21 22:14:12 +02:00
pragmas Fix overload resolution for pragmas evaluation (#8902) 2018-10-09 19:58:23 +02:00
proc Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
procvar Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
range Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02: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 remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
seq Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
sets Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +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 Prevent the construction of recursive tyStatic types (#9256) 2018-10-09 14:26:34 +02:00
stdlib fix #8225 os.isHidden was buggy on posix (#8315) 2018-10-15 00:22:34 +02:00
system Add toOpenArray[T](ptr UncheckedArray[T]) for clarity. (#9316) 2018-10-12 17:40:07 +02:00
template closes #4750 2018-09-03 10:02:37 +02:00
testdata
threads Fixes 8535 (#8591) 2018-08-17 00:34:27 +02:00
trmacros make tests green again 2018-09-24 16:00:57 +02:00
tuples fixes more nil handling regressions 2018-08-13 17:27:44 +02:00
typerel Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
types Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
untestable file mode bullshit 2018-08-05 09:59:16 +02:00
usingstmt
varres added a test to ensure that for-loop-variables cannot be mutated 2018-08-28 12:16:14 +02:00
varstmt
vm Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
benchmark.nim
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 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.