Nim/tests
2019-12-10 16:44:54 +01:00
..
actiontable
alias
ambsym
arithm ungeneric unsigned ops (#12230) 2019-10-11 08:38:08 +02:00
array guards.nim:sameTree(): handle uint literals correctly (#12483) [backport] 2019-10-22 18:18:33 +02:00
assert [backport] Fix spelling typos (#12755) 2019-11-28 08:30:55 +01:00
assign make tests green again 2019-05-27 21:29:02 +02:00
astoverload
astspec Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
async increase the timeout for 'tasyncclosestall' (#12744) 2019-11-26 14:12:15 +01:00
bind Remove deprecated modules (asyncio, sockets, ftpclient) (#10401) 2019-01-22 16:06:44 +01:00
borrow
casestmt Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
ccgbugs better support for PROGMEM like annotations for lets/vars; fixes #12216 (#12799) 2019-12-05 13:45:16 +01:00
clearmsg
closure introduce capture macro (#12712) 2019-12-10 13:16:37 +01:00
cnstseq
collections fixes #11764, faster hashing of (u)int (#12407) 2019-10-15 16:31:07 +02:00
compilepragma fixes #10299 (#11324) 2019-05-25 07:33:33 +02:00
compiler Fixes #12536 (#12568) [backport] 2019-11-02 08:21:49 +01:00
compilerapi make addQuoted work on nimscript (#12717) [backport] 2019-11-28 23:01:17 +01:00
compilerfeatures new compiler feature: --expandMacro 2019-05-29 20:47:28 +02:00
compiles delete list comprehension (#12392) 2019-11-22 19:57:43 +01:00
concat
concepts remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
constr fixes #10943 (#10947) 2019-04-05 14:50:57 +02:00
constraints
constructors
controlflow
converter Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
coroutines intVal works now on enum field symbols (#11403) 2019-06-05 14:55:47 +02:00
cpp test suite: rename tests containing 'fail' for easier search in logs 2019-11-26 16:04:28 +01:00
defaultprocparam
deprecated fix #8063 by adding a testcase for: Deprecation warnings for enum values print twice (#10508) 2019-01-31 11:44:11 +01:00
deps [backport] Fix spelling typos (#12755) 2019-11-28 08:30:55 +01:00
destructor ARC: yet another bugfix (#12871) 2019-12-10 16:44:54 +01:00
dir with space fixes #10042 (allow spaces in import) (#10504) 2019-01-31 08:20:00 +01:00
discard revert discardable transformation (#10905) 2019-04-21 09:57:53 +02:00
distinct fixes #11715 (#11721) 2019-07-13 07:55:56 +02:00
dll #12103 - CI for FreeBSD (#12179) 2019-11-29 21:00:54 +01: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 Assigning template to var/let/const gives a proper error (#12851) 2019-12-09 08:19:40 +00:00
exception fixes #11618 (#11969) 2019-08-17 21:19:57 +02:00
exprs
fields make tests green again 2019-05-27 21:29:02 +02:00
flags
float remove unused imports from tests 2019-11-06 14:35:45 +01:00
fragmentation
friends
gc fixes a flaky test for the realtime GC 2019-11-28 09:33:01 +01:00
generics [backport] fix #12528, fix #12525: incorrect generic type resolution for default values (#12538) 2019-10-28 16:56:38 +01:00
gensym fixes yet another gensym regression (#12145) 2019-09-06 00:45:00 +02:00
global
ic Incremental compilation (IC): Improvements (#11881) 2019-08-08 08:41:05 +02:00
implicit
import_in_config
init
iter remove unused imports from tests 2019-11-06 14:35:45 +01:00
js #12103 - CI for FreeBSD (#12179) 2019-11-29 21:00:54 +01:00
lent fixes #12224 (#12225) 2019-09-21 06:45:27 +02:00
let
lexer
lookups Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
macros fix #12740 (#12774) 2019-12-04 07:33:01 +00:00
magics run runnableExamples in the module scope (#11732) [feature] 2019-07-22 16:22:57 +02:00
manyloc remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
metatype fixes #12804 (#12809) 2019-12-05 07:38:12 +01:00
method fixes #6777 (#11347) 2019-05-28 22:00:01 +02:00
misc fix regression in align (#12680) 2019-11-19 09:58:47 +01:00
modules fixes #12420 [backport] (#12456) 2019-10-18 22:13:24 +02:00
namedparams fixes #12196 2019-09-16 12:12:44 +02:00
newconfig [feature] Added os.delEnv; add delEnv support to nimscript too (#11466) 2019-06-15 11:32:26 +02:00
nimble Fixes #12767 (#12768) 2019-11-29 10:18:44 +01:00
niminaction #12103 - CI for FreeBSD (#12179) 2019-11-29 21:00:54 +01:00
notnil Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
objects Fixed objects being erroneously zeroed out before object construction (#12814) [backport] 2019-12-05 17:31:51 +01:00
objvariant Fixes #12379 (#12591) [backport] 2019-11-04 20:57:14 +01:00
openarray typeToString can now show (recursively) resolved type aliases; fixes #8569 #8083 #8570 (#11678) 2019-08-31 08:26:45 +02:00
osproc
overflw make fullpaths the default in error messages and stack traces for mor… (#11385) 2019-06-05 08:02:54 +02:00
overload fixes #11375 (#11376) 2019-06-02 06:33:35 +02:00
package_level_objects
parallel remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
parser Remove immediate pragma (#11308) 2019-05-29 22:21:51 +02:00
pragmas fixes #5050; fixes #11826 (#12606) [backport] 2019-11-07 14:47:26 +01:00
proc fixes #12033 (#12039) 2019-08-26 20:14:21 +02:00
procvar
range Merge branch 'devel' into uint-range-checks 2019-09-02 22:03:10 +02:00
rational
realtimeGC
rodfiles
seq
sets set[T].len is an alias for set[T].card (#11885) [feature] 2019-08-05 14:27:45 +02:00
showoff remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
specialops
statictypes remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
stdlib add a StringTable.clear that requires no mode specification (#12853) 2019-12-09 06:58:36 +01:00
system fixes #12315 [backport]; refs #12314 (#12385) 2019-10-08 20:49:45 +02:00
template Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
testament test suite: rename tests containing 'fail' for easier search in logs 2019-11-26 16:04:28 +01:00
testdata
threads Fix and reenable thread tests (#11343) 2019-05-28 15:23:09 +02:00
tools fixes #11903 (#11908) 2019-08-31 19:32:59 +02:00
trmacros fixes #7524 2019-01-14 12:15:40 +01:00
tuples fix several typos in documentation and comments (#12553) 2019-10-30 09:08:45 +01:00
typerel fix tests 2019-07-08 15:24:20 -07:00
types fixes #11479 (#11641) 2019-07-03 07:22:30 +02:00
untestable fix #12426 (#12462) 2019-10-20 11:52:50 +02:00
usingstmt
valgrind attempt to add valgrind support to the CIs and testament (#12646) 2019-11-18 09:10:48 +01:00
varres fix tests 2019-07-08 15:24:20 -07:00
varstmt
vm fixes #12488 [backport] 2019-11-28 23:00:34 +01:00
ast_pattern_matching.nim add tastspec (and ast_pattern_matching) (#10863) 2019-03-19 11:45:29 +01:00
config.nims followup on #10573: prevent common user config to interfere with testament (excessiveStackTrace) (#10590) 2019-02-07 12:29:31 +01:00
dummy.txt
js.html
js.nim
mmaptest.nim Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
readme.md Fix reference to parseSpec proc in readme (#12359) 2019-10-04 19:30:58 +02:00
rectest.nim
stckovfl.nim
test_nimscript.nims remove subexes 2019-01-10 09:17:12 +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.