Nim/tests
2018-12-11 21:23:18 +01: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 language cleanup: the .unchecked pragma is dead 2018-11-06 13:55:03 +01:00
assert Fixes #9671 (#9750) 2018-11-19 09:22:21 +01:00
assign make tests green again 2018-10-13 08:39:56 +02:00
astoverload
async updated tests to be executed 2018-11-23 11:58:28 +01:00
bind Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
borrow
casestmt updated tests to be executed 2018-11-23 11:58:28 +01:00
ccgbugs join simple test 2018-11-23 11:58:32 +01:00
clearmsg make more tests green 2018-02-10 20:55:22 +01:00
closure fixes #9441 2018-12-06 08:06:54 +01: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 make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
concat
concepts cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
constr
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 fix #9832 (fixup) (#9859) 2018-12-04 16:48:08 +01:00
converter More converter fixes (#9737) 2018-11-26 09:51:13 +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 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 use control flow graph for sink params 2018-12-09 18:32:43 +00:00
dir with space updated tests to be executed 2018-11-23 11:58:28 +01:00
discard updated tests to be executed 2018-11-23 11:58:28 +01:00
distinct More descriptive names of test files (#9531) 2018-10-29 17:07:27 +01:00
dll activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
effects updated tests to be executed 2018-11-23 11:58:28 +01: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 Float values are invalid in enum 2018-12-09 14:20:01 +05:30
exception don't raise exception in the default handler (#9783) 2018-11-22 14:46:07 +01:00
exprs updated tests to be executed 2018-11-23 11:58:28 +01:00
fields Merge tests into a larger file (part 2 of ∞) (#9335) 2018-10-13 14:58:31 +02:00
flags make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
float make mod on floats available in the VM (#9591) 2018-11-05 09:36:28 +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 cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
gensym
global make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
implicit Merge tests into a larger file (part 2 of ∞) (#9335) 2018-10-13 14:58:31 +02:00
import_in_config
init activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
iter Fixes 9716 [backport] (#9790) 2018-11-24 10:50:48 +01:00
js Fix fat pointers, object copying, magic double evals on JS (#9411) [backport] 2018-12-04 12:04:27 +01: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 updated tests to be executed 2018-11-23 11:58:28 +01:00
lookups updated tests to be executed 2018-11-23 11:58:28 +01:00
macros fixes #9864 [backport] 2018-12-05 10:58:18 +01:00
magics Don't crash if GC_{un,}ref is called on nil (#9445) 2018-10-22 17:09:15 +02:00
manyloc removes deprecated T/P types 2018-11-16 13:27:56 +01:00
metatype cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
method More descriptive names of test files (#9531) 2018-10-29 17:07:27 +01:00
misc fixes #9868 2018-12-11 10:28:56 +01:00
modules Fix compilation of test on linux and mac 2018-12-09 15:44:18 +05:30
namedparams make more tests green 2018-02-10 20:55:22 +01:00
newconfig cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
nimble
niminaction fix for nimInAction 2018-11-23 11:58:30 +01:00
notnil make tests green again 2018-08-13 23:16:03 +02:00
objects threw away a silly test 2018-11-23 11:58:33 +01:00
objvariant cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
openarray Always check the deduced type validity for result 2018-09-17 15:33:44 +02:00
osproc more tests fixed 2018-11-23 11:58:29 +01:00
overflw Added more tests to toverflw 2018-06-15 19:46:17 +03:00
overload updated tests to be executed 2018-11-23 11:58:28 +01:00
package_level_objects
parallel eyewash 2018-11-23 11:58:31 +01:00
parser fixes #9633 2018-11-08 09:15:15 +01:00
pragmas add comment, fixes #9896 2018-12-08 11:39:11 +00: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 Empty check in shallow [backport] (#9676) 2018-11-21 11:56:38 +01:00
sets make tests green again 2018-11-16 19:54:49 +01: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 Merge pull request #9803 from GULPF/walkdirrec-relative 2018-12-06 09:29:35 +01:00
system cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
template fixes nested gensym'ed parameters; fixes #9476 2018-12-08 13:30:06 +01:00
testament Tester tests (#9787) 2018-11-27 10:00:32 +01:00
testdata
threads make tests green again 2018-11-16 19:54:49 +01:00
trmacros Merge tests into a larger file (part 8 of ∞) (#9583) 2018-11-06 18:33:58 +01:00
tuples Merge tests into a larger file (part 8 of ∞) (#9583) 2018-11-06 18:33:58 +01:00
typerel cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
types fixes #9794: sizeof tuple is incorrect if contains imported object (#9795) 2018-11-26 09:46:19 +01: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 fix #9872: setLen now works properly at CT [backport] 2018-12-08 14:33:42 -08: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.