Nim/tests
Bung bae0fb720a
fix #19149 Invalid codegen when returning var tuple from a template (#20762)
* fix #19149 Invalid codegen when returning var tuple from a template

* fix type
2022-11-06 11:49:34 +01:00
..
actiontable
alias fix #19349 incompatible type when mixing float32 and cfloat in generics (#20551) 2022-10-21 09:28:18 +02:00
align testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343) 2020-12-14 10:58:29 +01:00
ambsym closed ambiguous enum defaults to first overload (#20457) 2022-10-01 13:30:23 +02:00
arc Arc global (#20768) 2022-11-06 11:47:35 +01:00
arithm JS: fix div uint64 no truncation (#16899) 2021-02-15 14:22:46 +01:00
array style usages part one (openarray => openArray) (#19321) 2022-01-04 13:29:50 +01:00
assert revert #20719; relieve std/assertions of the sysFatal dep (#20743) 2022-11-04 09:53:19 +01:00
assign defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
astoverload
astspec fix deprecated example (#18721) 2021-08-21 08:22:00 +02:00
async defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
avr default threads on (#19368) 2022-07-06 13:06:41 +02:00
benchmarks fix #16752: threadvar now works with importcpp types; osx now uses native TLS (--tlsEmulation:off), which can be orders of magnitude faster (#16750) 2021-01-27 22:35:43 +01:00
bind 'lock levels' are deprecated, now a noop (#20539) 2022-10-11 09:17:09 +02:00
borrow borrowed procs can have a body now for documentation generation (#20617) 2022-10-24 10:08:39 +02:00
casestmt support cstring in case (#20130) 2022-09-01 18:10:00 +02:00
ccgbugs move widestrs out of system (#20462) 2022-10-01 22:35:09 +02:00
ccgbugs2 [add testcase] NRVO does not occur with init procedures (#19462) 2022-01-29 14:06:54 +01:00
clearmsg
closure fix #20152 Illegal capture of closure iterator, when should be legal (#20607) 2022-10-21 09:59:05 +02:00
cnstseq
collections follow up #20109; remove shallow seqs/strings for ORC (#20502) 2022-10-06 07:16:50 +02:00
compilepragma fixes #10299 (#11324) 2019-05-25 07:33:33 +02:00
compiler correct grammar (ref #20199) and add check for grammar.txt (#20494) 2022-10-06 16:36:32 +02:00
compilerapi big steps torwards an efficient, simple IC implementation (#16543) 2021-01-02 07:30:39 +01:00
compilerfeatures fix #16693: testament spec nimout too lax (#16698) 2021-04-04 13:47:28 -07:00
compiles deprecate unsafeAddr; extend addr (#19373) 2022-01-16 11:08:38 +01:00
concat
concepts Support doc comments in new-styled concepts (#20752) 2022-11-04 20:32:41 +08:00
constr fix #18990 Regression in proc symbol resolution; Error: attempting to… (#20554) 2022-10-12 20:44:45 -04:00
constraints
constructors Turn some of the errors back into warnings 2020-04-01 19:38:44 +02:00
controlflow Make unreachable code a warning instead of an error (#14816) 2020-06-29 08:49:53 +02:00
converter follow up #20109; remove shallow seqs/strings for ORC (#20502) 2022-10-06 07:16:50 +02:00
coroutines fix #15628 (#16387) 2021-01-21 17:31:47 +01:00
cpp closes #4678; add testcase (#20634) 2022-10-24 09:26:07 +08:00
defaultprocparam Add testcase for #12252 (#15676) 2020-10-22 12:51:03 +02:00
deprecated store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
destructor new move analyser2 (#20471) 2022-10-01 16:46:51 +02:00
dir with space
discard improve the 'has to be discarded' error message 2020-05-02 22:31:19 +02:00
distinct remove a special case in sigmatch; distinct pointer types no longer match nil type (#20251) 2022-08-23 19:27:20 +02:00
distros fix tdistros test which was failing on Nightlies 2020-04-28 15:59:32 +02:00
dll don't use {.rtl.} for generics, otherwise -d:useNimRtl gives ambiguous identifier nimrtl error (#18406) 2021-07-01 11:14:01 +02:00
effects add a testcase for laxeffects (#20750) 2022-11-04 12:43:32 +08:00
enum closes #12589; add testcase (#20769) 2022-11-06 11:46:51 +01:00
errmsgs revert #20719; relieve std/assertions of the sysFatal dep (#20743) 2022-11-04 09:53:19 +01:00
exception Remove side-effects from sysFatal with panics on (#20632) 2022-10-24 07:57:49 +02:00
exprs fix #16693: testament spec nimout too lax (#16698) 2021-04-04 13:47:28 -07:00
fields use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
float rename nimFpRoundtrips => nimPreviewFloatRoundtrip (#18566) 2021-07-23 14:57:47 -07:00
fragmentation
friends
gc remove shallowCopy for ARC/ORC (#20070) 2022-07-26 16:51:01 +02:00
generics fix #6637 array index type depends generic (#20673) 2022-10-27 12:22:04 +02:00
gensym defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
global
ic defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
import_in_config
importalls typo: nonexistant => nonexistent (#17918) 2021-05-02 00:26:41 +02:00
init DAA and 'out' parameters (#20506) 2022-10-06 17:08:41 +02:00
isolate fixes #19013 [backport:1.6] (#19111) 2021-11-09 12:43:16 +01:00
iter Fix double defer with break in closureiterators [backport] (#20630) 2022-10-24 08:50:48 +02:00
js fix #8821 JS codegen can produce extreme switch statements with case … (#20548) 2022-10-14 12:21:02 +02:00
lent 'lock levels' are deprecated, now a noop (#20539) 2022-10-11 09:17:09 +02:00
let Allow let to not have value when using importc (#14258) 2020-05-12 20:28:18 +02:00
lexer fixes #15688; handle strongSpace overflow issues (#20724) 2022-11-03 09:18:09 +01:00
lookups new .redefine pragma for templates, warn on redefinition without it (#20211) 2022-08-23 21:41:30 +02:00
macros store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
magics defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
manyloc defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
metatype defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
method fixes #20515; base method requires explicit {.gcsafe.} to be GC-safe (#20574) 2022-10-16 13:20:05 +02:00
misc Fix #18079 Illegal storage access compiling call with nested ref/deref (#20738) 2022-11-04 09:54:45 +01:00
modules defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
namedparams fixes #12196 2019-09-16 12:12:44 +02:00
navigator IC navigator: added support for include files (#17784) 2021-04-19 22:37:09 +02:00
newconfig fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6] (#19641) 2022-03-26 11:50:15 +01:00
nimble testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
nimdoc fix #16993, #18054, #17835 runnableExamples now works with templates and nested templates (#18082) 2021-06-02 09:02:14 -07:00
niminaction defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
notnil add testcase for #9466 (#17538) 2021-03-28 00:57:22 -07:00
objects fixes #20740; fixes pre-existing field visibility issues and removes efSkipFieldVisibilityCheck (#20741) 2022-11-03 15:46:16 +08:00
objvariant fix #19266; allow reassign discriminant field (#19567) 2022-02-25 20:33:28 +01:00
openarray enable static tests for topenarray (#20620) 2022-10-23 00:36:11 +08:00
osproc fixes #18058 (#18162) 2021-06-03 17:12:45 +02:00
overflw Fix #15706 (#15846) 2020-11-07 08:00:41 +00:00
overload fixes #20645 (#20646) 2022-10-24 21:41:29 +02:00
package Refactor and doc package handling, module name mangling (#19821) 2022-05-30 18:52:19 +02:00
package_level_objects
parallel defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
parser defaults to ORC (#19972) 2022-09-23 13:05:05 +02:00
pragmas 'lock levels' are deprecated, now a noop (#20539) 2022-10-11 09:17:09 +02:00
proc fix #18136 tests/proc/t17157.nim now gives SIGSEGV instead of error (#20555) 2022-10-13 06:39:43 +02:00
procvar
range fix #19678 Broken behavior with string ranges in case labels (#20475) 2022-10-01 18:17:07 +02:00
rational Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
realtimeGC testament: remove deadcode related to realtimeGC, testC, callCCompiler (#18087) 2021-05-26 11:49:01 -07:00
sandwich fixes #11225; generic sandwich problems; [backport:1.2] (#17255) 2021-03-09 20:19:24 +01:00
sets overloadable enums no longer experimental (#20298) 2022-09-05 23:38:38 +02:00
showoff style usages part one (openarray => openArray) (#19321) 2022-01-04 13:29:50 +01:00
slice allow HSlice bounded by constants of distinct types (#19219) [backport:1.2] 2021-12-06 20:38:23 +01:00
specialops tests and docs for call operator (#16980) 2021-02-09 12:18:16 +01:00
statictypes fix #20148 implicit compile time conversion int to ranged float cause… (#20698) 2022-10-29 18:04:05 +02:00
stdlib remove compiler/strutils2.nim (#20748) 2022-11-05 12:22:45 +01:00
stmt fix #15972 (#15994) 2020-11-18 00:14:14 +00:00
strictnotnil [Testament] Extend and document message testing aids (#19996) 2022-09-01 17:52:13 +02:00
stylecheck fixes #20397; fixes stylecheck regression (#20398) 2022-09-21 15:04:33 -04:00
system follow up #20109; remove shallow seqs/strings for ORC (#20502) 2022-10-06 07:16:50 +02:00
template fix #19149 Invalid codegen when returning var tuple from a template (#20762) 2022-11-06 11:49:34 +01:00
testament [Testament] Extend and document message testing aids (#19996) 2022-09-01 17:52:13 +02:00
testdata Add new self-signed 4096 bit certificate to testdata (#19758) 2022-05-08 11:54:04 +02:00
threads put std/threads under the umbrella of nimPreviewSlimSystem (#20711) 2022-10-31 06:36:50 +01:00
tools fixes niminst with stricteffects; add testcase for niminst (#20587) 2022-10-18 08:59:02 +02:00
trmacros store full definition AST for consts, fix noRewrite (#20115) 2022-09-28 15:05:01 +02:00
tuples closes #16331; add testcase (#20730) 2022-11-02 12:01:36 +08:00
typerel closes #13618; add testcase (#20734) 2022-11-02 19:25:51 +08:00
types closes #6213 #11777; add testcase (#20656) 2022-10-25 22:39:36 +08:00
untestable fixes broken ssl tests (#20181) 2022-08-09 11:48:17 +08:00
usingstmt remove {.this.} pragma, deprecated since 0.19 (#20201) 2022-08-23 19:44:37 +02:00
valgrind testament: support disabled:osx as alias to disabled:macosx (#17124) 2021-02-22 11:01:15 +01:00
varres close #17636 (#17643) 2021-04-06 16:20:01 +02:00
varstmt
views Unpack mSlice tupleconstr for static openarrays (#20615) 2022-10-22 06:37:23 +02:00
vm fixes #19201; fixes sink causes crash in VM (#20658) 2022-10-25 20:08:36 +02:00
whenstmt fix #19426 compile error using when/elif/else and typedesc in template (#20550) 2022-10-21 09:26:46 +02:00
ast_pattern_matching.nim remove deprecated type pragma syntax, fix bugs that required it (#20199) 2022-09-03 09:52:13 +02:00
config.nims add default field support for object in ARC/ORC (#20480) 2022-10-04 12:45:10 +02:00
dummy.txt
js.html
js.nim
m14634.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
mmaptest.nim Enable customizing PageShift to set PageSize for embedded targets (#19129) 2021-11-16 20:30:07 +01:00
readme.md [Testament] Extend and document message testing aids (#19996) 2022-09-01 17:52:13 +02:00
rectest.nim
stckovfl.nim
test_nimscript.nims move widestrs out of system (#20462) 2022-10-01 22:35:09 +02:00

This directory contains the test cases.

Each test must have a filename of the form: t*.nim

Note: Testament is only aware of tests under a directory (eg tests/foo/) and will ignore top-level tests like tests/tbar.nim.

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: run

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.

Categories

Each folder under this directory represents a test category, which can be tested by running koch tests pcat <category> (or cat to avoid parallel testing, which is slower).

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.