Nim/tests
2020-03-20 10:21:42 +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
align fixes #13122 (#13126) 2020-01-13 14:11:51 +01:00
ambsym require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
arc cycle breaker (#13593) 2020-03-19 22:58:16 +01:00
arithm fix operators containing percent for VM usage (#13536) 2020-03-11 01:01:25 +01:00
array guards.nim:sameTree(): handle uint literals correctly (#12483) [backport] 2019-10-22 18:18:33 +02:00
assert catchable defects (#13626) 2020-03-12 23:44:33 +01:00
assign fix rtti sizeof for varargs in global scope (#13125) [backport] 2020-01-13 10:17:21 +01:00
astoverload
astspec Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
async fix #12919 tasyncclosestall flaky: Address already in use (#12934) 2019-12-19 18:50:39 +01:00
bind Remove deprecated modules (asyncio, sockets, ftpclient) (#10401) 2019-01-22 16:06:44 +01:00
borrow require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
casestmt EndsInNoReturn in expressions extension, fixes #13490 (#13520) 2020-02-28 09:55:06 +00:00
ccgbugs fixes #13281 (#13282) 2020-01-28 14:55:54 +01:00
clearmsg require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
closure capture macro now accepts variables of different types (#13356) 2020-02-15 19:53:40 +01:00
cnstseq require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
collections tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of tests (#13498) [backport] 2020-02-26 22:07:09 +01: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 case-object transitions explicit, make unknownLineInfo a const, replace a few magic numbers with consts (#13170) 2020-01-17 10:34:31 +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 fix #13538 sigmatch errors are now sorted (#13701) 2020-03-20 09:28:03 +01:00
constr fixes #10943 (#10947) 2019-04-05 14:50:57 +02:00
constraints require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
constructors require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
controlflow Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
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 Attempt to finish off araq cpp exceptions (#13695) 2020-03-19 20:38:25 +01:00
defaultprocparam updated tests to be executed 2018-11-23 11:58:28 +01:00
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 optimizations (#13325) 2020-03-18 16:57:34 +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 Revert "remove dead code test_nimhcr_integration.(bat,sh) (#13388)" (#13396) 2020-02-12 13:22:26 +01:00
effects fixes a critical GC safety inference bug (#10615) 2019-03-05 19:54:44 +01:00
enum fix enumtostr crash for enum-range (#13035) 2020-01-05 09:18:14 +01:00
errmsgs fix #13538 sigmatch errors are now sorted (#13701) 2020-03-20 09:28:03 +01:00
exception Attempt to finish off araq cpp exceptions (#13695) 2020-03-19 20:38:25 +01:00
exprs require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
fields make tests green again 2019-05-27 21:29:02 +02:00
flags require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
float Revert "printing float values will have one more digit. (#13276) [backport]" (#13363) 2020-02-08 09:30:24 +01:00
fragmentation tests: disable flaky tests for now; closes #9421 2018-10-18 12:12:15 +02:00
friends tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
gc save another 33s of CI for tests/gc/gcleak.nim 2020-02-27 13:19:31 +01:00
generics fix #13524 astToStr now works inside generics (#13681) 2020-03-18 13:43:32 +01:00
gensym fixes yet another gensym regression (#12145) 2019-09-06 00:45:00 +02:00
global require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
ic Incremental compilation (IC): Improvements (#11881) 2019-08-08 08:41:05 +02:00
implicit lots of small changes 2018-12-11 21:23:22 +01: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 activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
iter Attempt to finish off araq cpp exceptions (#13695) 2020-03-19 20:38:25 +01:00
js relativePath("foo", "foo") is now ".", not "" (#13452) 2020-02-22 09:07:53 +01:00
lent fixes #12224 (#12225) 2019-09-21 06:45:27 +02:00
let require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
lexer megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
lookups Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
macros add expectIdent to macros (#12778) 2020-03-11 08:27:31 +01: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 #13646 2020-03-16 14:55:58 +01:00
method clean up deprecated stuff and unused imports in tests (#13059) 2020-01-07 09:49:08 +01:00
misc fixes #13671 [backport] (#13678) 2020-03-18 10:37:36 +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 new feature: --staticBoundChecks:on to enforce static array index checking (#10965) 2020-03-18 14:25:10 +01:00
objects fix when statements in inheritable generic objects (#13667) [backport] 2020-03-17 23:44:32 +01:00
objvariant Better case coverage error message for alias and range enum (#12913) 2019-12-18 10:29:01 +01:00
openarray clean up deprecated stuff and unused imports in tests (#13059) 2020-01-07 09:49:08 +01:00
osproc fix #13449 texitcode flaky on windows (#13487) 2020-02-25 17:49:16 +01:00
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 new feature: package level objects 2017-10-29 07:54:39 +01:00
parallel new feature: --staticBoundChecks:on to enforce static array index checking (#10965) 2020-03-18 14:25:10 +01:00
parser Remove immediate pragma (#11308) 2019-05-29 22:21:51 +02:00
pragmas fix operators containing percent for VM usage (#13536) 2020-03-11 01:01:25 +01:00
proc allow typed/untyped in magic procs (#12911) 2019-12-17 11:07:32 +01:00
procvar Merge tests into a larger file (part 5 of ∞) (#9368) 2018-10-16 10:50:10 +02:00
range catchable defects (#13626) 2020-03-12 23:44:33 +01:00
rational require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
realtimeGC WIP, most tests are now skipped 2018-12-11 21:23:18 +01:00
rodfiles remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
seq Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
sets tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of tests (#13498) [backport] 2020-02-26 22:07:09 +01:00
showoff Revert "printing float values will have one more digit. (#13276) [backport]" (#13363) 2020-02-08 09:30:24 +01:00
specialops dotops: add a simple object delegation test 2017-12-01 02:05:48 +01:00
statictypes remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
stdlib Add Base64 safe (#13672) 2020-03-20 10:21:42 +01:00
system rename lenTuple and lenVarargs (#13639) 2020-03-12 20:07:02 +01: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 Fix for #5134 (parseJson(string) should fail on leftover data) (#5203) 2017-01-11 06:50:18 +01:00
threads Fix and reenable thread tests (#11343) 2019-05-28 15:23:09 +02:00
tools new feature: --staticBoundChecks:on to enforce static array index checking (#10965) 2020-03-18 14:25:10 +01: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 #5170 (#13589) 2020-03-05 16:02:34 +01:00
untestable fix #12426 (#12462) 2019-10-20 11:52:50 +02:00
usingstmt Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
valgrind attempt to add valgrind support to the CIs and testament (#12646) 2019-11-18 09:10:48 +01:00
varres cleanup Ordinal (#13501) 2020-02-27 10:43:13 +01:00
varstmt Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
vm fix nim doc subdir/foo which was generating broken css; + other fixes (#13647) 2020-03-17 13:44:37 +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 Remove install.txt and readme.txt (#9521) 2018-10-28 13:36:52 +01:00
js.html
js.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
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 tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
stckovfl.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
test_nimscript.nims relativePath("foo", "foo") is now ".", not "" (#13452) 2020-02-22 09:07:53 +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.