summary refs log tree commit diff stats
path: root/tests/assert
Commit message (Collapse)AuthorAgeFilesLines
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-283-9/+9
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-301-1/+1
| | | | | | | | * stacktraces can now show custom runtime msgs * improve tests/stdlib/tstackframes.nim * fix test for --gc:arc * test --stacktraceMsgs:on and --stacktraceMsgs:off * --stacktracemsgs:off by default
* faster CIs (#13803)Miran2020-03-304-73/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
* catchable defects (#13626)Andreas Rumpf2020-03-121-1/+1
| | | | | | | | | | * allow defects to be caught even for --exceptions:goto (WIP) * implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180 * new implementation for integer overflow checking * produce a warning if a user-defined exception type inherits from Exception directly * applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic' * fixes #13627 * don't inherit from Exception directly
* sink parameter inference for types that have destructors (#13544)Andreas Rumpf2020-03-041-2/+2
| | | | | | | | | | | | | | * ensure capitalize doesn't take an inferred sink parameter * sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec. * sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required * fixes yet another critical DFA bug * better implementation that also understands if expressions etc * document sink parameter inference and allow for global disabling
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-1/+1
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* [backport] Fix spelling typos (#12755)Brian Wignall2019-11-281-1/+1
|
* test suite: rename tests containing 'fail' for easier search in logsAraq2019-11-263-17/+17
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* assertions: fixes #11545 (#11605)alaviss2019-07-014-4/+17
| | | | | | | | | | | | | | * assertions: properly fix #11545 * tests/assert: enable excessiveStackTrace * tests/assert: add test case for #11545 * tfailedassert_stacktrace: disable excessiveStackTrace * assertions: weird workaround for failing tests This fixes megatest on *nix, but have no idea why
* move system.dollars in a separate file (#10829)Miran2019-03-131-1/+1
|
* move assertions and iterators out of system.nim (#10597)Miran2019-03-071-3/+3
| | | | | * move assertions and iterators out of system.nim * limit nimsuggest tests to the first 3 suggestions
* require errormsg to be specified before file.Arne Döring2018-12-111-3/+0
|
* Fixes #9671 (#9750)Randy Smith2018-11-191-1/+1
|
* correctly render AST in doAssert/assert condition: fixes #8518; refs #9301 ↵Timothee Cour2018-10-141-29/+60
| | | | | | (#9332) * fixes #8518; refs #9301; correctly render AST in doAssert condition
* make tfailedassert_stacktrace.nim more robustAraq2018-09-151-8/+27
|
* Fix system.nim line number test case failureGanesh Viswanathan2018-09-121-3/+3
|
* add testcaseTimothee Cour2018-09-111-0/+19
|
* doAssert, assert now print full path of failing line on error (#8555)Timothee Cour2018-08-253-15/+81
|
* Fixes #8719 (onFailedAssert now works for doAssert) (#8731)awr12018-08-231-0/+11
|
* make tests green againAndreas Rumpf2018-07-051-1/+1
|
* Add column number to instantiation info (#7376)PMunch2018-04-121-1/+1
| | | | | | | | | | | | | | * Add column number to instantiation info Instantiation info left out column number for no good reason. This adds it in as the third element of the tuple. * Fix test that failed and added change to changelog An assertion test failed because it was declaring a type that was expected to be populated by instantiationInfo with the old signature. Also added the changes to the changelog as it is a breaking change.
* Remove expr/stmt (#5857)Arne Döring2017-07-251-1/+1
|
* make tests green againAndreas Rumpf2016-11-241-1/+1
|
* Fixed broken test. Added closureScope test.Yuriy Glukhov2016-06-281-0/+3
|
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-2/+2
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* fixes #2500Araq2015-04-101-1/+1
|
* Fix tests a bit moredef2015-03-101-1/+1
|
* some love for the testsuite; fixed regressionsAraq2015-03-011-2/+2
|
* Clean up tests/assertdef2015-02-041-1/+1
| | | | | | | 1 test still fails: - tunittests uses utemplates, which seems broken. not sure what it's supposed to do
* typo fixSimon Hafner2015-01-271-2/+2
|
* tester compiles againAraq2014-08-291-1/+1
|
* some minor fixesAraq2014-08-141-1/+1
|
* Change the expected path in tfailedassert.Dominik Picheta2014-04-061-1/+1
| | | | | | This will cause this test to fail on Linux. The behaviour on Windows is however correct, the filename returned by instantiationInfo is the projPath defined as being "relative to the project's root".
* fix the error "only proc headers can feature pragmas" when compiling in JS modeZahary Karadjov2014-01-231-1/+1
|
* unittest module works againAraq2014-01-181-1/+1
|
* new tester; all tests categorizedAraq2014-01-134-0/+88