Commit Graph

46 Commits

Author SHA1 Message Date
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
Charles Blake
39b98fede3 New probe seq swaps 1st two keys. Fix in cmp. 2015-02-13 08:50:26 -05:00
Araq
10335fd726 fixed minor bugs; cleaned up tests 2015-02-12 14:56:56 +01:00
Simon Hafner
7a3106d659 moved tsets test to collections/ 2014-02-12 16:15:34 -06:00
Simon Hafner
5498415f3b indexBy, which indexes a collection into a hashtable 2014-02-06 16:11:55 -06:00