Files
Nim/tests
alaviss 7ef268274f Haiku support for Nim (#8542)
* posix_other: Haiku now has spawn.h

This is added per https://dev.haiku-os.org/ticket/13446

* posix_other: Add Haiku specific Dirent members

* cpuinfo: Add an implementation for Haiku

* distros: Add basic Haiku support

* encodings: update Haiku support

* fenv, math: Haiku now provides libm

* times: Add Haiku struct members

* ansi_c, osalloc: Add Haiku constants

* threads: Add Haiku support

* testament: Haiku uses LIBRARY_PATH

* nim.cfg: Update Haiku support

libnetwork should only be linked if network functions are used

* threads: Haiku does not support -pthread switch

* tworkingdir: Haiku's env is in /bin

* posix_other: add SIGKILLTHR for Haiku

* sockets: link with libnetwork on Haiku

* coro: correct ucontext.h location

http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html

* coro: ucontext backend is not available on Haiku

Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX

* coro: fix setjmp backend

The compiler does not allow statements after a noreturn function

* nativesockets: Haiku doesn't support AI_V4MAPPED

* system: hostOS can contains "haiku"

* os: add support for Haiku's packagefs

packagefs is read-only, but there are writable holes to the underlying
file system as well

* os: update constant for Haiku
2018-08-14 09:35:07 +02:00
..
2017-07-25 09:28:23 +02:00
2018-07-05 15:51:04 +02:00
2018-07-05 15:51:04 +02:00
2018-08-06 19:44:15 +02:00
2018-07-05 19:14:18 +02:00
2015-03-17 17:50:32 +01:00
2018-08-12 20:43:30 +02:00
2018-02-10 20:55:22 +01:00
2018-08-12 20:41:48 +02: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-07-05 15:51:04 +02:00
2018-05-02 13:34:54 +02:00
2018-07-05 19:14:18 +02:00
2018-07-05 15:51:04 +02:00
2018-07-05 19:14:18 +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-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-07-05 15:51:04 +02:00
2018-07-05 15:51:04 +02:00
2018-02-10 20:55:22 +01:00
2018-05-02 13:34:54 +02:00
2018-07-05 19:14:18 +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-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-08-04 20:10:03 +02:00
2018-08-01 10:57:35 +02:00
2018-07-05 19:14:18 +02:00
2018-08-14 09:35:07 +02:00
2018-05-25 16:21:33 +02:00
2018-05-05 21:45:07 +02:00
2018-06-27 21:41:40 +02:00
2017-07-25 09:28:23 +02:00
2018-04-21 23:58:24 +02:00
2018-07-30 22:28:24 +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.