Nim/tests
2019-05-29 15:44:52 +02:00
..
actiontable
alias
ambsym
arithm
array
assert move system.dollars in a separate file (#10829) 2019-03-13 15:59:09 +01:00
assign make tests green again 2019-05-27 21:29:02 +02:00
astoverload
astspec add tastspec (and ast_pattern_matching) (#10863) 2019-03-19 11:45:29 +01:00
async better docs: osproc (#10708) 2019-02-19 17:25:03 +01:00
bind
borrow
casestmt
ccgbugs make tests green again 2019-05-27 21:29:02 +02:00
clearmsg
closure
cnstseq
collections faster CountTable sort(), optional SortOrder (#11010) 2019-04-16 09:42:54 +02:00
compilepragma fixes #10299 (#11324) 2019-05-25 07:33:33 +02:00
compiler fixes #11194 (#11242) 2019-05-14 01:28:44 +02:00
compilerapi make tests green again 2019-05-27 21:29:02 +02:00
compiles
concat
concepts make megatest work again 2019-04-02 08:23:13 +02:00
constr fixes #10943 (#10947) 2019-04-05 14:50:57 +02:00
constraints
constructors
controlflow
converter
coroutines
cpp fixes #10765 (#10993) [backport] 2019-04-11 13:51:51 +02:00
defaultprocparam
deprecated
deps
destructor fixes #11205 2019-05-28 21:30:41 +02:00
dir with space
discard revert discardable transformation (#10905) 2019-04-21 09:57:53 +02:00
distinct fixes #7167 (#11300) 2019-05-22 11:50:05 +02:00
dll make tests green again 2019-05-27 21:29:02 +02:00
effects fixes a critical GC safety inference bug (#10615) 2019-03-05 19:54:44 +01:00
enum add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
errmsgs Tuple error message (#11141); fixes #3211 2019-05-15 17:59:06 +02:00
exception fixes #11309 (#11310) 2019-05-23 19:32:44 +02:00
exprs
fields make tests green again 2019-05-27 21:29:02 +02:00
flags
float
fragmentation
friends
gc make tests green again 2019-05-27 21:29:02 +02:00
generics fixes subtype relation regression 2019-05-22 07:41:16 +02:00
gensym
global
implicit
import_in_config
init
iter close #5859 by adding a test 2019-05-29 13:37:55 +02:00
js implement system.default for the JS target 2019-03-05 19:58:54 +01:00
lent make test green 2019-03-05 05:53:28 +01:00
let
lexer
lookups Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
macros rename a file, so that megatest doesn't complain 2019-05-29 15:44:52 +02:00
magics
manyloc Fixed #9762 (#11296) 2019-05-29 12:11:03 +02:00
metatype Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
method fixes #6777 (#11347) 2019-05-28 22:00:01 +02:00
misc make tests green again 2019-05-27 21:29:02 +02:00
modules fixes #11188 (#11319) 2019-05-24 22:50:43 +02:00
namedparams
newconfig
nimble
niminaction
notnil
objects add tests, closes #3012, closes #7244 2019-02-27 12:39:35 +01:00
objvariant make tests green again 2019-05-27 21:29:02 +02:00
openarray Fixes for ptr array deref codegen (#11191) 2019-05-07 08:14:38 +02:00
osproc
overflw
overload fixes #8568 (#11303) 2019-05-22 20:59:54 +02:00
package_level_objects
parallel make tests green 2019-05-28 07:31:25 +02:00
parser revert parser stmtListExpr (#11007) 2019-04-17 11:55:41 +02:00
pragmas Fix astdef typ deref (#10245) 2019-04-05 16:43:36 +02:00
proc fixes #10838 (#10841) 2019-03-18 11:04:01 +01:00
procvar
range Tighten the conversion from tyRange to scalar types (#10495) 2019-02-23 11:52:52 +01:00
rational
realtimeGC
rodfiles
seq
sets remove shadow warning, fixes #10732 (#11039) 2019-04-17 11:54:51 +02:00
showoff
specialops
statictypes
stdlib move test for #7632 above import strformat (#11270) 2019-05-20 10:17:56 +02:00
system disable talloc2 on 32 bits (#10656) 2019-02-13 08:04:06 +01:00
template close #5235 by adding a test 2019-05-29 11:52:54 +02:00
testament
testdata
threads Fix and reenable thread tests (#11343) 2019-05-28 15:23:09 +02:00
trmacros
tuples Tuple error message (#11141); fixes #3211 2019-05-15 17:59:06 +02:00
typerel
types Fix type recursion check (#11144) 2019-05-07 08:29:17 +02:00
untestable Detect local "primary" IP address 2019-03-17 16:58:27 +00:00
usingstmt
varres
varstmt
vm close #8199 by adding a test 2019-05-29 14:47:45 +02:00
ast_pattern_matching.nim add tastspec (and ast_pattern_matching) (#10863) 2019-03-19 11:45:29 +01:00
config.nims
dummy.txt
js.html
js.nim
mmaptest.nim
readme.md
rectest.nim
stckovfl.nim
test_nimscript.nims

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.