Files
Nim/tests
LemonBoy 5afcd09cb3 Pervasive replacement of nkRecWhen in generic types
Long story short, even if the type contains no reference at all to its
generic parameters we still have to walk its AST and evaluate any
nkRecWhen nodes that semRecordNodeAux skipped due to the type being a
generic one.

We also must be careful to modify the type `n` node in place since it
may be referenced by the caller as seen in the tillegaltyperecursion
test.

Moreover we also can't have the nkSym drift away from their original
values in order not to break the JS nkObjConstr codegen.
2018-10-19 22:17:38 +02:00
..
2017-07-25 09:28:23 +02:00
2018-07-05 15:51:04 +02:00
2018-07-05 19:14:18 +02:00
2015-03-17 17:50:32 +01:00
2018-02-10 20:55:22 +01:00
2018-08-12 20:41:48 +02:00
2014-01-13 02:10:03 +01:00
2018-08-21 22:14:12 +02:00
2018-02-10 20:55:22 +01:00
2018-05-02 13:34:54 +02:00
2018-05-14 21:38:18 +02:00
2018-08-13 23:16:03 +02:00
2018-07-05 15:51:04 +02:00
2018-08-13 23:16:03 +02:00
2018-07-05 19:14:18 +02:00
2018-08-10 17:27:30 +02:00
2018-07-05 15:51:04 +02:00
2018-04-29 23:26:21 +01:00
2018-08-05 11:42:38 +02:00
2018-08-13 12:54:02 +02:00
2018-08-22 17:20:41 +02:00
2018-01-21 03:04:22 +01:00
2018-02-10 20:55:22 +01:00
2018-07-05 15:51:04 +02:00
2016-08-04 19:36:13 +02:00
2018-08-13 12:29:03 +02:00
2018-07-05 15:51:04 +02:00
2018-02-10 20:55:22 +01:00
2018-08-13 23:16:03 +02:00
2018-05-14 21:38:18 +02:00
2016-01-05 07:52:56 +07:00
2018-08-14 09:35:07 +02:00
2018-06-15 19:46:17 +03:00
2018-07-05 19:14:18 +02:00
2018-08-21 22:14:12 +02:00
2018-05-02 13:34:54 +02:00
2017-11-18 23:03:16 +01:00
2017-02-01 12:09:24 +01:00
2018-08-04 20:10:03 +02:00
2018-08-22 17:20:41 +02:00
2018-08-13 13:02:52 +02:00
2018-08-17 00:34:27 +02:00
2018-05-05 21:45:07 +02:00
2018-08-13 17:27:44 +02:00
2017-07-25 09:28:23 +02:00
2018-04-21 23:58:24 +02:00
2018-08-13 23:16:03 +02:00
2013-03-16 23:53:07 +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.