summary refs log tree commit diff stats
path: root/tests/sets
Commit message (Collapse)AuthorAgeFilesLines
* stricter set type match, implicit conversion for literals (#24176) develmetagn2024-10-032-3/+34
| | | | | | | | | | | | | | | | | | fixes #18396, fixes #20142 Set types with base types matching less than a generic match (so subrange matches, conversion matches, int conversion matches) are now considered mismatching, as their representation is different on the backends (except VM and JS), causing codegen issues. An exception is granted for set literal types, which now implicitly convert each element to the matched base type, so things like `s == {'a', 'b'}` are still possible where `s` is `set[range['a'..'z']]`. Also every conversion match in this case is unified under the normal "conversion" match, so a literal doesn't match one set type better than the other, unless it's equal. However `{'a', 'b'} == s` or `{'a', 'b'} - s` etc is now not possible. when it used to work in the VM. So this is somewhat breaking, and needs a changelog entry.
* proper error message for out-of-range enum sets (#24027)metagn2024-08-291-0/+51
| | | fixes #17848
* fixes testament targets field (#23472)ringabout2024-04-031-1/+1
|
* fixes #23422; card regression (#23437)ringabout2024-03-281-0/+38
| | | | | | | | | fixes #23422 ref https://github.com/nim-lang/Nim/issues/20997 https://github.com/nim-lang/Nim/pull/21165 The function `cardSet` is used for large sets that are stored in the form of arrays. It shouldn't be passed as a pointer
* adds another pass for sets fixes #6259 (#22099)Juan M Gómez2023-06-151-0/+4
| | | | | | | * adds another pass for sets fixes #6259 * Update tsets.nim removes extra `#`
* some test cleanups & category reorganization (#22010)metagn2023-06-061-0/+6
| | | | | | | | | | | | | | | | | * clean up some test categories * mention exact slice issue * magics into system * move trangechecks into overflow * move tmemory to system * try fix CI * try fix CI * final CI fix
* add test for #13764 (#21699)Bung2023-04-211-0/+6
|
* warn on set types bigger than max size, default to 0..255 for int literals ↵metagn2023-04-171-0/+10
| | | | | | | | | | | | | | | | | | | (#21659) * test implicitly huge set types refs https://github.com/nim-lang/RFCs/issues/298 * oh my god * boot at least * don't error, fix remaining issues, no 2 len arrays * fix runnable example * test assuming 0..255 for int literal * test refactor, add changelog, test
* fix #20997 calling system.card[T](x: set[T]) with T of int8 or uint8 … ↵Bung2022-12-231-0/+18
| | | | | | | (#21010) * fix #20997 calling system.card[T](x: set[T]) with T of int8 or uint8 uses mismatched C array sizes * fullfil set variant
* overloadable enums no longer experimental (#20298)metagn2022-09-051-2/+2
| | | depends on #20126
* Add test for issue 15435 (#19079)Kaushal Modi2021-11-031-0/+29
| | | | | | | | | * Add test for issue 15435 Closes https://github.com/nim-lang/Nim/issues/15435. * Specify bug # in comment Addresses https://github.com/nim-lang/Nim/pull/19079#discussion_r740279547
* close #16123 std/sets with closures in cpp (#17921)Timothee Cour2021-05-031-5/+13
| | | | | * close #16123 std/sets with closures in cpp * fixup
* improve tsets.nim, twrong_setconstr.nim and avoid name clashes with compiler ↵Timothee Cour2021-04-291-192/+63
| | | | | | | sets (#17876) * improve tests/sets/tsets.nim and avoid name clashes with compiler sets * avoid name clashes in twrong_setconstr.nim and merge into tsets
* follow up #17536 (#17727)flywind2021-04-151-1/+1
|
* close #5792 with testcase (#17536)flywind2021-03-271-0/+17
|
* fix #17385, `len` must be declared before `items` (#17386)Miran2021-03-152-0/+15
|
* fix #17076 (#17081)flywind2021-02-181-3/+25
|
* use doAssert in tests (#16486)flywind2020-12-281-61/+61
|
* tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of ↵Timothee Cour2020-02-261-8/+64
| | | | | | | | | | | 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
* set[T].len is an alias for set[T].card (#11885) [feature]Andy Davidoff2019-08-051-0/+4
|
* remove shadow warning, fixes #10732 (#11039)Miran2019-04-171-3/+2
|
* require errormsg to be specified before file.Arne Döring2018-12-112-4/+5
|
* make tests green againAraq2018-11-161-3/+3
|
* More descriptive names of test files (#9531)Miran2018-10-291-0/+0
| | | | | * change generic `tissues` name to more specific * change `tvarious` to more specific names
* Merge tests into a larger file (part 5 of ∞) (#9368)Miran2018-10-165-205/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge magics * merge metatype tests * merge method tests * merge objects tests * change `import future` to `import sugar` Nim in Action tests are left with `import future`, to ensure compatibility. * merge overload tests * merge proc tests * merge procvar tests * merge range tests * merge seq tests * merge sets tests * remove wrong assert from `tsets3` * fix `jsTests` * better fix
* fixes #8425Araq2018-08-041-1/+9
|
* add sets.pop procedure (analogue to python) (#8383)skilchen2018-07-211-0/+22
|
* Check the RHS when building a set (#8159)LemonBoy2018-06-301-0/+6
| | | Fixes #2669
* Fix compile time set cardinality (#7558)Oscar Nihlgård2018-04-101-0/+4
|
* Add counterpart to containsOrIncl for excl (#6360)superfunc2017-09-151-1/+11
|
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-042-209/+209
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* renamed writeln to writeLine in testspatrick dw2015-06-191-1/+1
|
* fixes #2470, fixes #1354Araq2015-04-281-15/+155
|
* Add TSet difference testsdef2014-07-151-1/+20
|
* Fixed TSet proc names to conform with setFelix Krause2014-06-261-11/+11
|
* Added logical set operations to TSetFelix Krause2014-06-251-0/+81
|
* Tester now appreciates the test target. Modified 'cmd' in specs.Dominik Picheta2014-04-161-1/+0
|
* Changed tests and tools to use 'discard' statements instead of 'nil' for ↵Clay Sweetser2014-02-151-9/+9
| | | | empty blocks.
* added tests for setSimon Hafner2014-02-101-0/+12
|
* moved the tests for TSet to the correct placeSimon Hafner2014-02-091-15/+0
|
* added test specs for the testerSimon Hafner2014-02-011-0/+3
|
* corrected docs and testsSimon Hafner2014-02-011-13/+9
|
* sets equivalenceSimon Hafner2014-01-311-0/+16
|
* new tester; all tests categorizedAraq2014-01-132-0/+126