Files
Nim/tests
Dmitry Atamanov bf5d619a52 Add MemMapFileStream. Fixes in memFiles. (#7944)
* Add MemMapFileStream

* Added tests

* Fixed bug in memfiles (zero index for string)

* Added flush to changelog

* Attempt to fix Win's nuances

* Fix attempt to fix

* Continue...

* And again...

* Reworked tests (all for win on Win)

* Fixes in flush (Win)

* Replace fn vars to consts

* Added the attempts parameter to the flush

* Replace while to for

* Move to memfiles

* Use Natural instead of uint

* Better error messages for append mode. Handle specific cases.
2018-06-14 17:34:26 +01:00
..
2017-07-25 09:28:23 +02:00
2018-04-24 11:45:08 +02:00
2018-06-10 23:42:53 +03:00
2018-02-10 20:55:22 +01:00
2015-03-17 17:50:32 +01:00
2018-04-06 10:53:21 +02:00
2018-03-23 13:28:22 +01:00
2018-02-10 20:55:22 +01:00
2018-02-10 20:55:22 +01:00
2018-05-02 13:34:54 +02:00
2014-01-13 02:10:03 +01: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-05-02 13:34:54 +02:00
2018-06-10 22:27:51 +03:00
2018-05-02 13:34:54 +02:00
2018-05-02 13:34:54 +02:00
2018-05-05 21:45:07 +02:00
2018-01-18 09:04:32 +01:00
2018-06-10 22:27:51 +03:00
2018-06-07 15:28:41 +03:00
2018-04-15 17:34:03 +02:00
2018-01-21 03:04:22 +01:00
2018-02-10 20:55:22 +01:00
2016-08-04 19:36:13 +02:00
2018-06-13 12:18:21 +02:00
2018-05-02 13:34:54 +02:00
2018-05-02 13:34:54 +02:00
2018-04-30 02:56:19 +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
2016-01-05 07:52:56 +07:00
2018-05-02 13:34:54 +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-04-06 13:10:22 +02:00
2018-06-06 02:22:33 -03:00
2018-05-25 16:21:33 +02:00
2018-05-05 21:45:07 +02:00
2018-06-06 22:29:31 +07:00
2018-05-14 21:38:18 +02:00
2017-07-25 09:28:23 +02:00
2018-04-21 23:58:24 +02:00
2018-06-04 13:38:26 +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.