summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-011-0/+112
| | | | | | | | | The new mechanism can deal with more complex scenarios such as not nil field appearing in a non-default case object branch or a field within a generic object that may depend on a when branch. The commit also plugs another hole: the user is no longer able to create illegal default values through seq.setLen(N).
* Fix https://github.com/nim-lang/Nim/issues/4907Zahary Karadjov2020-04-011-1/+40
|
* Close https://github.com/nim-lang/Nim/issues/11428Zahary Karadjov2020-04-011-0/+12
|
* Perform nil checks during object construction and within compiles()Zahary Karadjov2020-04-011-3/+2
| | | | Close https://github.com/nim-lang/Nim/issues/6494
* More precise error messages for uninitialized fields in the presence of ↵Zahary Karadjov2020-04-011-3/+7
| | | | inheritance
* Hrm, the new errors highlighted some code that seems to be brokenZahary Karadjov2020-04-012-2/+2
| | | | | | New issue: since `Table[A, B]` allocates its backing storage with `newSeq[KeyValuePair[A, B]]`, it's no longer legal to create a table with `not nil` types used as either keys or values.
* not nil types are illegal to construct through default(T)Zahary Karadjov2020-04-011-0/+14
|
* Turn the warning for uninitialized (result) variables into errorsZahary Karadjov2020-04-011-2/+81
|
* Fix tests/notnil/tnotnil_in_objconstr.nimZahary Karadjov2020-04-011-1/+1
|
* Plug another hole: default(T) forbidden for objects requiring initializationZahary Karadjov2020-04-011-0/+5
|
* Don't allow 'var x: T' for objects that require initializationZahary Karadjov2020-04-011-0/+8
|
* More sophistication; Allow requiresInit to be specified per-fieldZahary Karadjov2020-04-011-0/+31
|
* First steps, the compiler can boot with enforced requiresInitZahary Karadjov2020-04-011-4/+4
|
* fixes #13810 (#13821)cooldome2020-03-311-1/+22
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* macros for proc types, macros for types (#13778)Andreas Rumpf2020-03-311-1/+87
| | | | | | | | | * new minor feature: macros for proc types, to be documented * Finished the implementation and added tests * [skip ci] Describe the new custom pragmas in the manual and the changelog Co-authored-by: Zahary Karadjov <zahary@gmail.com>
* Unwind just the "pseudorandom probing" part of recent sets,tables changes ↵c-blake2020-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#13816) * Unwind just the "pseudorandom probing" (whole hash-code-keyed variable stride double hashing) part of recent sets & tables changes (which has still been causing bugs over a month later (e.g., two days ago https://github.com/nim-lang/Nim/issues/13794) as well as still having several "figure this out" implementation question comments in them (see just diffs of this PR). This topic has been discussed in many places: https://github.com/nim-lang/Nim/issues/13393 https://github.com/nim-lang/Nim/pull/13418 https://github.com/nim-lang/Nim/pull/13440 https://github.com/nim-lang/Nim/issues/13794 Alternative/non-mandatory stronger integer hashes (or vice-versa opt-in identity hashes) are a better solution that is more general (no illusion of one hard-coded sequence solving all problems) while retaining the virtues of linear probing such as cache obliviousness and age-less tables under delete-heavy workloads (still untested after a month of this change). The only real solution for truly adversarial keys is a hash keyed off of data unobservable to attackers. That all fits better with a few families of user-pluggable/define-switchable hashes which can be provided in a separate PR more about `hashes.nim`. This PR carefully preserves the better (but still hard coded!) probing of the `intsets` and other recent fixes like `move` annotations, hash order invariant tests, `intsets.missingOrExcl` fixing, and the move of `rightSize` into `hashcommon.nim`. * Fix `data.len` -> `dataLen` problem.
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-303-1/+73
| | | | | | | | * 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-3068-1059/+485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* '.push raises: []' now also affects proc types (#13776)Andreas Rumpf2020-03-291-2/+21
| | | | | | | | | * '.push raises: []' now also affects proc types * fixes the regression * less disruptive bugfix * another attempt
* fix #13730 (#13787)Timothee Cour2020-03-281-0/+4
|
* fix typos and deprecation warnings for tconvariancerules.nim (#13772)Arne Döring2020-03-271-21/+20
|
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-261-2/+82
| | | | | | | | | | | | | | | | | | | | | * Fix typeSym.getImpl for ref types * Fix a codegen issue affecting the test suite of nim-beacon-chain * Fix tests/stdlib/tjsonmacro To understand the fix better it may help to take a look at the history of the replaced code. The nil check that is removed in this commit was introduced in another fix that failed to identify the root cause of the issue - namely that we allow an object type to exist for which no ast is present: https://github.com/nim-lang/Nim/pull/9601/files The original intention of the code is more obvious here: https://github.com/nim-lang/Nim/pull/9538/files
* Continue bool conversion fixing (#13751)cooldome2020-03-251-1/+8
| | | | | | | | | * continue fixing #13744 * improve style * improve test Co-authored-by: cooldome <ariabushenko@bk.ru>
* fix deprecations and other warnings (#13748)Miran2020-03-2517-51/+50
|
* fixes #13744 (#13749)cooldome2020-03-251-0/+35
| | | | | | | * fixes #13744 * improve style Co-authored-by: cooldome <ariabushenko@gmail.ru>
* fixes #13722 (#13729)Andreas Rumpf2020-03-231-3/+6
| | | | | * fixes #13722 * better fix
* new syntax for lvalue references: `var b {.byaddr.} = expr` (#13508)Timothee Cour2020-03-231-0/+70
| | | | | | | | * new syntax for lvalue references: `var b {.byaddr.} = expr` * on type mismatch, `???(0, 0)` not shown anymore * * compiler now lowers `var a: {.foo.}: MyType = expr` to foo(a, MyType, expr) * new pragmas.byaddr defined in pure library code exploiting this lowering * skip `template foo() {.pragma.}`
* Revert "fix #13417 (#13712)" (#13728)Andreas Rumpf2020-03-231-21/+0
| | | This reverts commit a5f02cac85281fc2804e910f330f0c11d3c4f77b.
* better error messages for Nim's effect systemAraq2020-03-221-1/+2
|
* fix #13417 (#13712)Arne Döring2020-03-221-0/+21
| | | | | * fix #13417 * add test
* fixes #13715 (#13716)Arne Döring2020-03-222-1/+7
| | | | | * fixes #13715 * fix test
* fix #13720 (#13721)Arne Döring2020-03-221-1/+3
|
* SSL certificate verify GitHub action (#13697)Federico Ceratto2020-03-206-0/+524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement SSL/TLS certificate checking #782 * SSL: Add nimDisableCertificateValidation Remove NIM_SSL_CERT_VALIDATION env var tests/untestable/thttpclient_ssl.nim ran successfully on Linux with libssl 1.1.1d * SSL: update integ test to skip flapping tests * Revert .travis.yml change * nimDisableCertificateValidation disable imports Prevent loading symbols that are not defined on older SSL libs * SSL: disable verification in net.nim ..when nimDisableCertificateValidation is set * Update changelog * Fix peername type * Add define check for windows * Disable test on windows * Add exprimental GitHub action CI for SSL * Test nimDisableCertificateValidation
* [RFC] 'walkDir' now has a new 'checkDir' flag, to mimic behaviour of other ↵Timothee Cour2020-03-202-13/+18
| | | | | languages (#13642) Co-authored-by: narimiran
* fixes #13698 (#13706)Andreas Rumpf2020-03-201-1/+6
|
* Add Base64 safe (#13672)Juan Carlos2020-03-201-0/+15
| | | | * Implement RFC-4648 Section-7 * https://github.com/nim-lang/Nim/pull/13672#issuecomment-600993466
* fix #13538 sigmatch errors are now sorted (#13701)Timothee Cour2020-03-205-47/+47
| | | | | | | * fix #13538 sigmatch now sorted and has reliable order * re-enable tests that were disabled because of that bug * fix remaining tests and un-disable 2 other tests that were affected by this bug
* cycle breaker (#13593)Andreas Rumpf2020-03-191-7/+12
| | | | * cycle breaking as an alternative to cycle detection
* Attempt to finish off araq cpp exceptions (#13695)cooldome2020-03-194-15/+17
| | | | | | | | | | | | | | | * config update * disable a questionable test * remove c++ exception handling IDs, new impl doesn't require it anymore * C++ based exceptions finally work * fixes bootstrapping problem in C++ mode * teach GCC it's 2020 now * more bugfixes for C++ based exception handling * apply cooldome's patch * another attempt to enable C++11 * bug fix Co-authored-by: Araq <rumpf_a@web.de> Co-authored-by: cooldome <ariabushenko@bk.ru>
* fixes #13691 (#13694)Andreas Rumpf2020-03-191-0/+29
|
* arc optimizations (#13325)Andreas Rumpf2020-03-185-3/+63
| | | | | * scope based destructors * handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim * make this branch mergable, logic is disabled for now
* new feature: --staticBoundChecks:on to enforce static array index checking ↵Andreas Rumpf2020-03-185-21/+23
| | | | (#10965)
* fix #13524 astToStr now works inside generics (#13681)Timothee Cour2020-03-181-0/+6
|
* fixes #13622 (#13679)Andreas Rumpf2020-03-181-0/+20
|
* fixes #13671 [backport] (#13678)Andreas Rumpf2020-03-181-0/+5
|
* fix when statements in inheritable generic objects (#13667) [backport]Jasper Jenkins2020-03-171-0/+11
|
* rewritten goto based exception handling; much cleaner implementation;… ↵Andreas Rumpf2020-03-171-0/+69
| | | | | | (#13677) * rewritten goto based exception handling; much cleaner implementation; fixes #13668
* Fixes #13659 (#13674)cooldome2020-03-171-1/+25
| | | | | * fixes #13659 Co-authored-by: cooldome <ariabushenko@bk.ru>
* fix `nim doc subdir/foo` which was generating broken css; + other fixes (#13647)Timothee Cour2020-03-171-1/+1
| | | | | | * docgen: minor refactoring via docOutDir * fix css for `nim doc subdir/foo` without --outdir nor -o * tcompilesetting.nim: keep `git status` clean * re-enable pkg nimgame2 that got fixed upstream
* fix sets of scoped imported enums (#13666)Jasper Jenkins2020-03-172-0/+12
|