Files
Nim/tests
GULPF a879973081 Better times module (#6552)
* First work on better timezones

* Update tests to new api.
Removed tests for checking that `isDst` was included when formatting, since `isDst` no longer affects utc offset (the entire utc offset is stored directly in `utcOffset` instead).

* Deprecate getLocaltime & getGmTime
* Add `now()` as a shorthand for GetTIme().inZone(Local)
* Add FedericoCeratto's timezone tests (#6548)
* Run more tests in all timezones

* Make month enum start at 1 instead of 0
* Deprecate getDayOfWeekJulian
* Fix issues with gc safety
* Rename TimeInfo => DateTime
* Fixes #6465
* Improve isLeapYear
* FIx handling negative adjTime

* Cleanup:
- deprecated toSeconds and fromSeconds, added fromUnix and toUnix instead (that returns int64 instead of float)
- added missing doc comments
- removed some unnecessary JS specific implementations

* Fix misstake in JS `-` for Time

* Update usage of TimeEffect
* Removed unecessary use of `difftime`
* JS fix for local tz
* Fix subtraction of months
* Fix `days` field in `toTimeInterval`
* Style and docs
* Fix getDayOfYear for real this time...
* Fix handling of adding/subtracting time across dst transitions
* Fix some bad usage of the times module in the stdlib
* Revert to use proper time resoultion for seeding in random.nim
* Move deprecated procs to bottom of file
* Always use `epochTime` in `randomize`
* Remove TimeInterval normalization
* Fixes #6905

* Fix getDayOfWeek for year < 1
* Export toEpochDay/fromEpochDay and change year/month/monthday order
* Add asserts for checking that the monthday is valid
* Fix some remaining ambiguous references to `Time`
* Fix ambiguous reference to Time
2017-12-18 23:11:28 +01:00
..
2017-07-25 09:28:23 +02:00
2017-07-25 09:28:23 +02:00
2017-12-15 15:33:43 +01:00
2017-07-25 09:28:23 +02:00
2015-03-17 17:50:32 +01:00
2017-12-15 11:21:49 +01:00
2017-07-25 09:28:23 +02:00
2014-01-13 02:10:03 +01:00
2017-08-14 17:43:39 +02:00
2016-08-02 14:53:21 +02:00
2017-07-25 09:28:23 +02:00
2017-01-31 23:05:36 +01:00
2017-10-15 09:32:53 +02:00
2017-11-18 23:15:35 +01:00
2017-07-25 09:28:23 +02:00
2017-11-21 13:22:27 +01:00
fix
2017-07-24 23:21:51 +02:00
2017-11-01 00:56:03 +01:00
2017-12-18 23:11:28 +01:00
2015-03-17 00:02:47 +01:00
2017-11-05 13:02:46 +01:00
2016-08-04 19:36:13 +02:00
2017-07-25 09:28:23 +02:00
2017-09-28 21:52:23 +02:00
2017-12-15 13:24:47 +01:00
2017-09-05 09:03:09 +02:00
2017-11-23 03:12:09 +01:00
2016-01-05 07:52:56 +07:00
2017-11-19 20:09:38 +01:00
2017-11-01 18:13:27 +03:00
2017-11-18 23:03:16 +01:00
2016-08-27 13:26:16 +02:00
2017-02-01 12:09:24 +01:00
2017-06-20 11:29:42 +02:00
2017-12-18 23:11:28 +01:00
2017-07-25 09:28:23 +02:00
2017-07-25 09:28:23 +02:00
2017-12-15 13:24:47 +01:00
2017-07-25 09:28:23 +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.