summary refs log tree commit diff stats
path: root/tests/collections/ttables.nim
Commit message (Collapse)AuthorAgeFilesLines
* rename nimEnableHashRef [backport] (#18941)flywind2021-10-041-1/+0
| | | | | | * rename nimEnableHashRef [backport] * Apply suggestions from code review Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* hashes for refs should be an opt-in feature (#18098)Miran2021-05-301-0/+1
|
* fix https://github.com/nim-lang/RFCs/issues/311 remove unary slice (#16714)Timothee Cour2021-04-191-1/+1
|
* std/hashes: hash(ref|ptr|pointer) + other improvements (#17731)Timothee Cour2021-04-161-0/+14
|
* use doAssert in tests (#16486)flywind2020-12-281-47/+47
|
* change/remove deprecated stuffnarimiran2020-10-281-23/+5
|
* fix #15750narimiran2020-10-281-0/+6
|
* remove a condition that table size must be passed as power of 2 (#14926)Miran2020-07-081-0/+10
| | | | | | | | | | | | | | | * remove a condition that table size must be passed as power of 2 * remove power-of-2 condition from sets and sharedtables * remove power-of-2 condition from deques * use 'correctSize' for both branches * prettify changelog.md and fix typos * add a changelog entry * fix double-call of 'right-size' * fix the same thing in sets.nim * introduce a new internal proc `slotsNeeded` Deprecate the public proc `rightSize`, which is not needed anymore. Now it is an identity function, allowing the old code to work correctly and without extra allocations.
* tables.nim: Add named fields in `smallest` and `largest` (#14919)ee72020-07-061-0/+14
| | | | | | | | | | The `smallest` and `largest` procs for `CountTable` returned a tuple with named fields, but the same procs for `CountTableRef` returned an anonymous tuple. This commit makes those `CountTableRef` procs more consistent, and adds a test. Fixes: #14918
* Hrm, the new errors highlighted some code that seems to be brokenZahary Karadjov2020-04-011-1/+1
| | | | | | 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.
* faster CIs (#13803)Miran2020-03-301-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of ↵Timothee Cour2020-02-261-2/+43
| | | | | | | | | | | tests (#13498) [backport] * fix #13496 handle tombstones * add test * more tests * fix #13504; add SharedTable tests * fix #https://github.com/nim-lang/Nim/issues/13505 intsets.missingOrExcl silently gave wrong results sometimes * add test for tintsets
* Remove testutils (#13435) [backport]Clyybber2020-02-191-1/+4
|
* [backport] pseudorandom probing for hash collision (#13418)Timothee Cour2020-02-191-4/+27
|
* fixes #11764, faster hashing of (u)int (#12407)Miran2019-10-151-2/+2
|
* faster CountTable sort(), optional SortOrder (#11010)Andy Davidoff2019-04-161-15/+30
| | | | | | | | | * use existing sort for CountTable, and add SortOrder options to CountTable, OrderedTable sort(s) * add some tests, runnables, etc. * fix runnable imports
* testament: joinable is now an explicit concept of a test specAndreas Rumpf2018-12-111-1/+2
|
* lots of small changesArne Döring2018-12-111-2/+2
|
* require errormsg to be specified before file.Arne Döring2018-12-111-3/+2
|
* make some tests faster (#9413)Miran2018-10-171-25/+6
| | | | | | | | | | | | * remove duplicated slow test * smaller `convex hull` * smaller sleep * faster `trtree` * smaller sleep in `tfuturestream`
* Merge tests into a larger file (part 1 of ∞) (#9318)Miran2018-10-121-271/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge actiontable tests * merge arithm tests * merge array tests * merge assign tests * merge bind tests * merge casestmt tests * merge closure tests * merge cnt seq tests * merge collections tests * merge concept issues tests * merge concept tests * fix failing tests * smaller outputs Use `doAssert` where possible. * fix wrong output * split `tcomputedgoto` * revert merging concepts * fix failing test
* Fixed mutex usage in SharedList and SharedTable. Closes #6988 (#6990)Yuriy Glukhov2017-12-311-1/+2
|
* Improved collection-to-string behavior (#6825)Fabian Keller2017-12-141-1/+1
|
* Implement 'take' for Table and TableRef (#5773)Ruslan Mustakov2017-05-041-0/+15
|
* Add compute proc for SharedTable (#5385)Ruslan Mustakov2017-03-021-1/+25
|
* reenabled clear test, made clear working (#5323)Arne Döring2017-02-021-22/+20
|
* Fixes #5035Felix Krause2016-11-181-1/+24
|
* Table fixes. fixes #4901Felix Krause2016-10-231-0/+33
| | | | | | | | * added `==` for OrderedTable, CountTable and the *Ref types * added missing documentation to all `==` procs * fixed clear() for OrderedTables, which did not work because `var` does not work well with `|` * added tests
* Disable failing tests for tables.clear()Kier Davis2016-07-091-20/+22
| | | | | The tests for tables.clear() in tests/collections/ttables.nim currently fail as a result of #4448, so I've wrapped them in a 'when false' to disable them until the bug is fixed.
* Add tests for tables.clear()Kier Davis2016-07-091-0/+21
| | | | This should reduce the chance of regressions.
* Merge branch 'mget' of https://github.com/def-/Nim into def--mgetAraq2015-10-131-1/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: lib/pure/collections/critbits.nim lib/pure/collections/tables.nim lib/pure/xmltree.nim lib/system/sets.nim tests/collections/ttables.nim tests/collections/ttablesref.nim
| * Rename mget to `[]`def2015-03-311-8/+11
| | | | | | | | | | | | | | | | | | - In sets, tables, strtabs, critbits, xmltree - This uses the new var parameter overloading - mget variants still exist, but are deprecated in favor of `[]` - Includes tests and fixed tests and usages of mget - The non-var `[]` now throws an exception instead of returning binary 0 or an empty string
* | Add contains proc for tables to allow usage of `in`Jonathan2015-05-051-7/+9
|/
* Fix unknown symbol in tables mpairs iterator.Hans Raaf2015-02-211-0/+16
| | | | Fixes an error with mpairs iterator which was introduced with 5fbcf93860. This is used by nimforum thats why I found it. I also added a testcase for the mpairs iterator.
* Add some unit tests for mgetOrPut and hasKeyOrPut.Charles Blake2015-02-171-1/+9
|
* New probe seq swaps 1st two keys. Fix in cmp.Charles Blake2015-02-131-1/+1
|
* fixed minor bugs; cleaned up testsAraq2015-02-121-21/+127
|
* indexBy, which indexes a collection into a hashtableSimon Hafner2014-02-061-0/+22