Zahary Karadjov
0521f98486
Hrm, the new errors highlighted some code that seems to be broken
...
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.
2020-04-01 19:38:44 +02:00
Miran
8088633250
faster CIs ( #13803 )
...
* 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
2020-03-30 13:18:12 +02:00
Miran
5b55aa52d0
fix deprecations and other warnings ( #13748 )
2020-03-25 19:15:34 +01:00
Timothee Cour
42dad3a836
tables/sharedtables/intsets/etc: fix #13496 , #13504 , #13505 ; add lots of 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
2020-02-26 22:07:09 +01:00
Clyybber
87dd19453b
Remove testutils ( #13435 ) [backport]
2020-02-19 23:02:08 +01:00
Timothee Cour
8c22518d67
[backport] pseudorandom probing for hash collision ( #13418 )
2020-02-19 17:19:55 +01:00
Miran
734da9e1df
fixes #11764 , faster hashing of (u)int ( #12407 )
2019-10-15 16:31:07 +02:00
Andy Davidoff
01f09567c4
faster CountTable sort(), optional SortOrder ( #11010 )
...
* use existing sort for CountTable, and
add SortOrder options to CountTable, OrderedTable sort(s)
* add some tests, runnables, etc.
* fix runnable imports
2019-04-16 09:42:54 +02:00
Timothee Cour
6ce3949c8a
add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail ( #10070 )
...
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim
* Note: isNamedTuple is useful in other places, eg #10010 (comment)
* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim
* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -08:00
Andreas Rumpf
ac785b0623
testament: joinable is now an explicit concept of a test spec
2018-12-11 21:23:24 +01:00
Arne Döring
a5ecbf823f
lots of small changes
2018-12-11 21:23:22 +01:00
Arne Döring
2a4c09ff88
megatest can be executed
2018-12-11 21:23:21 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
Miran
95504caa31
make some tests faster ( #9413 )
...
* remove duplicated slow test
* smaller `convex hull`
* smaller sleep
* faster `trtree`
* smaller sleep in `tfuturestream`
2018-10-17 19:46:42 +02:00
Miran
7f18d7cbc1
Merge tests into a larger file (part 1 of ∞) ( #9318 )
...
* 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
2018-10-12 17:02:46 +02:00
data-man
cc63351a5a
Updated tests for CritBitTree $
2018-06-07 18:49:59 +03:00
Lolo Iccl
af591544c5
Modify hash for HashSet to use xor to mix hash of items.
2018-05-09 17:41:41 +02:00
Lolo Iccl
5c7b66e07a
Modify previous commit and add tests
2018-05-09 17:41:41 +02:00
Andreas Rumpf
d8fde9daba
make tests green
2018-05-05 21:45:07 +02:00
Oscar Nihlgård
8caf257607
Don't escape multibyte characters ( #7570 )
2018-04-23 11:09:48 +02:00
Yuriy Glukhov
d1e10f9aa3
Fixed mutex usage in SharedList and SharedTable. Closes #6988 ( #6990 )
2017-12-31 09:28:51 +01:00
Fabian Keller
6df6ec27ec
Improved collection-to-string behavior ( #6825 )
2017-12-14 14:02:13 +01:00
Arne Döring
000b8afd26
Remove expr/stmt ( #5857 )
2017-07-25 09:28:23 +02:00
Ruslan Mustakov
78315792d3
Implement 'take' for Table and TableRef ( #5773 )
2017-05-04 22:33:52 +02:00
Dmitriy Fomichev
268a1f7cfd
Deques compilation error fix ( #5591 )
2017-03-24 00:09:51 +01:00
GrundleTrundle
13ba0b557e
Added clear() function for OrderedSet and HashSet. ( #5545 )
2017-03-16 08:06:24 +01:00
Ruslan Mustakov
a81247dcbe
Add compute proc for SharedTable ( #5385 )
2017-03-02 15:31:30 +01:00
Fabian Keller
5774145f5d
added hash for uints ( #5435 )
2017-02-26 00:17:21 +01:00
Arne Döring
2c6c865b35
reenabled clear test, made clear working ( #5323 )
2017-02-02 23:06:13 +01:00
Felix Krause
93a998204c
Fixes #5035
2016-11-18 23:42:15 +01:00
Felix Krause
73b0bb52bb
Table fixes. fixes #4901
...
* 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
2016-10-23 11:21:52 +02:00
Andreas Rumpf
4077050a42
fixes a critical tables bug that caused 'enlarge' to crash after 'add'
2016-09-05 08:51:38 +02:00
Kier Davis
8e843354e1
Disable failing tests for tables.clear()
...
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.
2016-07-09 18:21:37 +01:00
Kier Davis
0390248419
Add tests for tables.clear()
...
This should reduce the chance of regressions.
2016-07-09 17:21:18 +01:00
Araq
d8b0edc323
Merge branch 'mget' of https://github.com/def-/Nim into def--mget
...
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
2015-10-13 00:22:27 +02:00
Araq
2c33ebed7b
improves new tests
2015-10-12 21:12:00 +02:00
Peter Mora
75097e2981
sequtils related changes
2015-10-05 22:42:22 +02:00
Adam Strzelecki
e80465dacf
tests: Trim .nim files trailing whitespace
...
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
Fabian Keller
414d69ccea
added hash function for ordinal types
2015-07-03 11:19:17 +02:00
Andreas Rumpf
31d472d83d
Merge pull request #2660 from MrJohz/contains-tables
...
Add contains proc for tables to allow usage of `in`
2015-05-08 02:19:45 +02:00
Varriount
d3f69e14f7
Merge pull request #2596 from Nycto/devel
...
Fix floats in tuples in HashSets
2015-05-07 13:02:42 -04:00
Jonathan
8e4af5ace0
Add contains proc for tables to allow usage of in
2015-05-05 23:26:58 +01:00
Araq
7d3a6b42d9
fixes #2625
2015-05-03 01:08:48 +02:00
Nycto
4f88238761
Fix floats in tuples in HashSets
...
Previously, the added tests would fail to compile with
errors complaining that 'hash(float)' didn't exist
2015-04-24 08:25:58 -07:00
def
63f9385327
Rename mget to []
...
- 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
2015-03-31 00:32:39 +02:00
Hans Raaf
a41778725a
Added Test for zip() with anonymous tuples.
2015-03-17 00:15:23 +01:00
Hans Raaf
93aa73284e
Fix unknown symbol in tables mpairs iterator.
...
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.
2015-02-21 23:20:02 +01:00
Araq
1c88d26ebf
added test case for #2107
2015-02-20 20:01:23 +01:00
Charles Blake
b65032e77e
Add some unit tests for mgetOrPut and hasKeyOrPut.
2015-02-17 09:55:46 -05:00
Charles Blake
db257669c3
New probe seq swaps 1st two keys. Fix in compare.
2015-02-16 07:15:34 -05:00