Nim/tests
2018-11-23 11:58:28 +01:00
..
actiontable Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
alias Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
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
benchmarks make tests\benchmarks programs compile again 2018-10-28 13:17:08 +01:00
bind Merge tests into a larger file (part 1 of ∞) (#9318) 2018-10-12 17:02:46 +02:00
borrow
caas
casestmt updated tests to be executed 2018-11-23 11:58:28 +01:00
ccgbugs make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
clearmsg make more tests green 2018-02-10 20:55:22 +01:00
closure updated tests to be executed 2018-11-23 11:58:28 +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 More descriptive names of test files (#9531) 2018-10-29 17:07:27 +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 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 make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
coroutines updated tests to be executed 2018-11-23 11:58:28 +01:00
cpp updated tests to be executed 2018-11-23 11:58:28 +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 Destructors: move into nkTupleConstr and move on tuple unpacking (#9776) 2018-11-22 18:33:19 +01: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
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 fixes #9764 2018-11-23 09:54:57 +01:00
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 updated tests to be executed 2018-11-23 11:58:28 +01:00
gensym equality check on NimSym has now support in the VM; refs #6139 2017-09-03 01:15:40 +02:00
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 fixes a regression that caused --import in a config file to break things 2016-08-29 11:33:41 +02:00
init make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
iter make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
js Fix printing and comparing uninitialized strings 2018-10-21 21:18:10 +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 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 make run the default action of a test in tester 2018-11-23 11:58:28 +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 make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
method More descriptive names of test files (#9531) 2018-10-29 17:07:27 +01:00
misc updated tests to be executed 2018-11-23 11:58:28 +01:00
modules make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
namedparams make more tests green 2018-02-10 20:55:22 +01:00
newconfig Fixes #9671 (#9750) 2018-11-19 09:22:21 +01:00
nimble Implement .nimble-link files in the compiler and add tests for them. 2017-09-02 15:28:25 +01:00
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 make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
objvariant updated tests to be executed 2018-11-23 11:58:28 +01: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 updated tests to be executed 2018-11-23 11:58:28 +01:00
package_level_objects new feature: package level objects 2017-10-29 07:54:39 +01:00
parallel updated tests to be executed 2018-11-23 11:58:28 +01:00
parser fixes #9633 2018-11-08 09:15:15 +01:00
pragmas make run the default action of a test in tester 2018-11-23 11:58:28 +01: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 updated tests to be executed 2018-11-23 11:58:28 +01:00
system updated tests to be executed 2018-11-23 11:58:28 +01:00
template updated tests to be executed 2018-11-23 11:58:28 +01:00
testdata Fix for #5134 (parseJson(string) should fail on leftover data) (#5203) 2017-01-11 06:50:18 +01:00
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 updated tests to be executed 2018-11-23 11:58:28 +01:00
types make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
untestable file mode bullshit 2018-08-05 09:59:16 +02:00
usingstmt Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
varres added a test to ensure that for-loop-variables cannot be mutated 2018-08-28 12:16:14 +02:00
varstmt
vm updated tests to be executed 2018-11-23 11:58:28 +01:00
benchmark.nim
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.