summary refs log tree commit diff stats
path: root/tests/assert/tassert_c.nim
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation for assertions (#16988)konsumlamm2021-02-111-3/+3
| | | | | | | | | | | * Improve documentation for assertions * Apply suggestions Fix tests/assert/tassert_c.nim * Use runnableExamples * Move runnableExamples to module scope
* fix #16499 (#16514)flywind2021-01-041-1/+1
|
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-3/+4
| | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-1/+1
| | | | | | | | | | | | | | * 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
* 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.
* test suite: rename tests containing 'fail' for easier search in logsAraq2019-11-261-0/+39