summary refs log tree commit diff stats
path: root/tests/collections
Commit message (Expand)AuthorAgeFilesLines
* remove a condition that table size must be passed as power of 2 (#14926)Miran2020-07-081-0/+10
* tables.nim: Add named fields in `smallest` and `largest` (#14919)ee72020-07-061-0/+14
* Remove deprecated stuff from stdlib (#14699)Miran2020-06-171-3/+2
* fix #14655 setLen(seq) now zeros memory (#14656)Timothee Cour2020-06-141-1/+8
* fix mapIt issues #12625 & #12639 (#14041)Judd2020-04-211-0/+3
* forward type alignment information to seqs (#12430)Arne Döring2020-04-191-0/+17
* Add `hashWangYi1` (#13823)c-blake2020-04-152-3/+10
* Hrm, the new errors highlighted some code that seems to be brokenZahary Karadjov2020-04-011-1/+1
* faster CIs (#13803)Miran2020-03-303-8/+316
* fix deprecations and other warnings (#13748)Miran2020-03-252-10/+10
* tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of test...Timothee Cour2020-02-261-2/+43
* Remove testutils (#13435) [backport]Clyybber2020-02-192-2/+7
* [backport] pseudorandom probing for hash collision (#13418)Timothee Cour2020-02-192-7/+29
* fixes #11764, faster hashing of (u)int (#12407)Miran2019-10-152-3/+3
* faster CountTable sort(), optional SortOrder (#11010)Andy Davidoff2019-04-161-15/+30
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) ...Timothee Cour2019-01-081-3/+3
* 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
* megatest can be executedArne Döring2018-12-111-0/+0
* require errormsg to be specified before file.Arne Döring2018-12-112-6/+3
* make some tests faster (#9413)Miran2018-10-171-25/+6
* Merge tests into a larger file (part 1 of ∞) (#9318)Miran2018-10-1215-716/+704
* Updated tests for CritBitTree $data-man2018-06-071-3/+3
* Modify hash for HashSet to use `xor` to mix hash of items.Lolo Iccl2018-05-091-4/+0
* Modify previous commit and add testsLolo Iccl2018-05-091-4/+52
* make tests greenAndreas Rumpf2018-05-051-2/+2
* Don't escape multibyte characters (#7570)Oscar Nihlgård2018-04-231-2/+8
* 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-143-3/+109
* Remove expr/stmt (#5857)Arne Döring2017-07-251-1/+1
* Implement 'take' for Table and TableRef (#5773)Ruslan Mustakov2017-05-041-0/+15
* Deques compilation error fix (#5591)Dmitriy Fomichev2017-03-241-0/+17
* Added clear() function for OrderedSet and HashSet. (#5545)GrundleTrundle2017-03-161-0/+42
* Add compute proc for SharedTable (#5385)Ruslan Mustakov2017-03-021-1/+25
* added hash for uints (#5435)Fabian Keller2017-02-261-0/+15
* 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
* fixes a critical tables bug that caused 'enlarge' to crash after 'add'Andreas Rumpf2016-09-051-0/+13
* Disable failing tests for tables.clear()Kier Davis2016-07-091-20/+22
* Add tests for tables.clear()Kier Davis2016-07-092-0/+46
* Merge branch 'mget' of https://github.com/def-/Nim into def--mgetAraq2015-10-132-3/+9
|\
| * Rename mget to `[]`def2015-03-312-17/+23
* | improves new testsAraq2015-10-122-3/+12
* | sequtils related changesPeter Mora2015-10-052-0/+35
* | tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-042-3/+3
* | added hash function for ordinal typesFabian Keller2015-07-031-0/+75
* | Merge pull request #2660 from MrJohz/contains-tablesAndreas Rumpf2015-05-082-15/+19
|\ \
| * | Add contains proc for tables to allow usage of `in`Jonathan2015-05-052-15/+19
* | | Merge pull request #2596 from Nycto/develVarriount2015-05-071-14/+34
|\ \ \ | |/ / |/| |
pan> ^
49d810f34 ^
1a7fdb09d ^



46ee026e7 ^
342834d7f ^


6b38b37b4 ^
0fff332b8 ^
342834d7f ^
46ee026e7 ^
342834d7f ^
03b05bd34 ^

46ee026e7 ^
03b05bd34 ^



46ee026e7 ^

03b05bd34 ^
3cef2129b ^

46ee026e7 ^

03b05bd34 ^
46ee026e7 ^
03b05bd34 ^

























342834d7f ^
03b05bd34 ^





a16e6bd22 ^
342834d7f ^


6b38b37b4 ^
342834d7f ^


















6b38b37b4 ^
342834d7f ^
a16e6bd22 ^
03b05bd34 ^




1a7fdb09d ^
03b05bd34 ^



























03b05bd34 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
                                                                                                                                                                
 


                                                                                 
 














                                                                                        
            

                                                                     
 

                                                                           
                                                       
 

                                                                            
 




                                                                              
                                                  
 
                                         
 



                                                                               
                                                                            
                            
 



                                                                                 
 
   
                                               
        



                                                              

                        

   

                                                                              
 



                                                                             
 
                                                                             
                                                                        

                                                                
 

                                                                            
 
         



                                                                             
 


               
                                                                                                                    
                                                                                                                                         
 
               
                                                                                                                                                                                                                                                                

                                                                              
 



                                                                                    

                                                                                     
                                                                                    

                                                                                                                           

                                                                               
                                             
                                                                      

























                                                                                         
                                                   





                                                                   
 


          
                                                                                        


















                                                                                                                                                                 
                                                                                                                                                            
 
          




                                                                                 
                                                                 



























                                                                                                                         
                                                                                  
# <img src="https://raw.githubusercontent.com/nim-lang/assets/master/Art/logo-crown.png" height="28px"/> Nim [![Build Status][badge-nim-travisci]][nim-travisci]

This repository contains the Nim compiler, Nim's stdlib, tools and documentation.
For more information about Nim, including downloads and documentation for
the latest release, check out [Nim's website][nim-site].

## Community
[![Join the IRC chat][badge-nim-irc]][nim-irc]
[![Join the Gitter chat][badge-nim-gitter]][nim-gitter]
[![Get help][badge-nim-forum-gethelp]][nim-forum]
[![View Nim posts on Stack Overflow][badge-nim-stackoverflow]][nim-stackoverflow-newest]
[![Follow @nim_lang on Twitter][badge-nim-twitter]][nim-twitter]

* The [forum][nim-forum] - the best place to ask questions and to discuss Nim.
* [#nim IRC Channel (Freenode)][nim-irc] - a place to discuss Nim in real-time.
  Also where most development decisions get made.
* [Gitter][nim-gitter] - an additional place to discuss Nim in real-time. There
  is a bridge between Gitter and the IRC channel.
* [Stack Overflow][nim-stackoverflow] - a popular Q/A site for programming related
  topics that includes posts about Nim.

## Compiling
The compiler currently officially supports the following platform and
architecture combinations:

  * Windows (Windows XP or greater) - x86 and x86_64
  * Linux (most, if not all, distributions) - x86, x86_64, ppc64 and armv6l
  * Mac OS X (10.04 or greater) - x86, x86_64 and ppc64

More platforms are supported, however they are not tested regularly and they
may not be as stable as the above-listed platforms.

Compiling the Nim compiler is quite straightforward if you follow these steps:

First, the C source of an older version of the Nim compiler is needed to
bootstrap the latest version because the Nim compiler itself is written in the
Nim programming language. Those C sources are available within the 
[``nim-lang/csources``][csources-repo] repository.

Next, to build from source you will need:

  * A C compiler such as ``gcc`` 3.x/later or an alternative such as ``clang``,
    ``Visual C++`` or ``Intel C++``. It is recommended to use ``gcc`` 3.x or
    later.
  * Either ``git`` or ``wget`` to download the needed source repositories.
  * The ``build-essential`` package when using ``gcc`` on Ubuntu (and likely
    other distros as well). 

Then, if you are on a \*nix system or Windows, the following steps should compile
Nim from source using ``gcc``, ``git`` and the ``koch`` build tool (in the place
of ``sh build.sh`` you should substitute ``build.bat`` on x86 Windows or
``build64.bat`` on x86_64 Windows):

```
$ git clone https://github.com/nim-lang/Nim.git
$ cd Nim
$ git clone --depth 1 https://github.com/nim-lang/csources.git
$ cd csources
$ sh build.sh
$ cd ../
$ bin/nim c koch
$ ./koch boot -d:release
```

Finally, once you have finished the build steps (on Windows, Mac or Linux) you
should add the ``bin`` directory to your PATH.

## Koch
``koch`` is the build tool used to build various parts of Nim and to generate
documentation and the website, among other things. The ``koch`` tool can also
be used to run the Nim test suite. 

Assuming that you added Nim's ``bin`` directory to your PATH, you may execute
the tests using ``./koch tests``. The tests take a while to run, but you
can run a subset of tests by specifying a category (for example 
``./koch tests cat async``).

For more information on the ``koch`` build tool please see the documentation
within the [doc/koch.rst](doc/koch.rst) file.

## Nimble
``nimble`` is Nim's package manager and it can be acquired from the
[``nim-lang/nimble``][nimble-repo] repository. Assuming that you added Nim's
``bin`` directory to your PATH, you may install Nimble from source by running
``koch nimble`` within the root of the cloned repository.


## Contributors

This project exists thanks to all the people who contribute. [Read on to find out how to contribute](#contributing).
<a href="https://github.com/nim-lang/Nim/graphs/contributors"><img src="https://opencollective.com/Nim/contributors.svg?width=890" /></a>

## Contributing
[![Backers on Open Collective](https://opencollective.com/nim/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/nim/sponsors/badge.svg)](#sponsors) [![Contribute to Nim via Gratipay][badge-nim-gratipay]][nim-gratipay]
[![Setup a bounty via Bountysource][badge-nim-bountysource]][nim-bountysource]
[![Donate Bitcoins][badge-nim-bitcoin]][nim-bitcoin]

We welcome everyone's contributions to Nim independent of how small or how large
they are. Anything from small spelling fixes to large modules intended to
be included in the standard library are welcome and appreciated. Before you get
started contributing, you should familiarize yourself with the repository structure:

* ``bin/``, ``build/`` - these directories are empty, but are used when Nim is built.
* ``compiler/`` - the compiler source code. Also includes nimfix, and plugins within
  ``compiler/nimfix`` and ``compiler/plugins`` respectively.
* ``nimsuggest`` - the nimsuggest tool that previously lived in the [``nim-lang/nimsuggest``][nimsuggest-repo] repository. 
* ``config/`` - the configuration for the compiler and documentation generator.
* ``doc/`` - the documentation files in reStructuredText format.
* ``lib/`` - the standard library, including:
    * ``pure/`` - modules in the standard library written in pure Nim.
    * ``impure/`` - modules in the standard library written in pure Nim with
    dependencies written in other languages.
    * ``wrappers/`` - modules which wrap dependencies written in other languages.
* ``tests/`` - contains categorized tests for the compiler and standard library.
* ``tools/`` - the tools including ``niminst`` and ``nimweb`` (mostly invoked via
  ``koch``).
* ``web/`` - [the Nim website][nim-site].
* ``koch.nim`` - tool used to bootstrap Nim, generate C sources, build the website,
  and generate the documentation.

If you are not familiar with making a pull request using GitHub and/or git, please
read [this guide][pull-request-instructions].

Ideally you should make sure that all tests pass before submitting a pull request.
However, if you are short on time, you can just run the tests specific to your
changes by only running the corresponding categories of tests. Travis CI verifies
that all tests pass before allowing the pull request to be accepted, so only
running specific tests should be harmless.

If you're looking for ways to contribute, please look at our [issue tracker][nim-issues].
There are always plenty of issues labelled [``Easy``][nim-issues-easy]; these should
be a good starting point for an initial contribution to Nim.

You can also help with the development of Nim by making donations. Donations can be
made using:

* [Open Collective](https://opencollective.com/nim)
* [Gratipay][nim-gratipay]
* [Bountysource][nim-bountysource]
* [Bitcoin][nim-bitcoin]

If you have any questions feel free to submit a question on the
[Nim forum][nim-forum], or via IRC on [the \#nim channel][nim-irc].


## Backers

Thank you to all our backers! [[Become a backer](https://opencollective.com/Nim#backer)]

<a href="https://opencollective.com/Nim#backers" target="_blank"><img src="https://opencollective.com/Nim/backers.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Nim#sponsor)]

<a href="https://opencollective.com/Nim/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/2/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/3/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/4/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/5/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/6/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/7/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/8/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/9/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/9/avatar.svg"></a>

You can also see a list of all our sponsors/backers from various payment services on the [sponsors page](https://nim-lang.org/sponsors.html) of our website.

## License
The compiler and the standard library are licensed under the MIT license, except
for some modules which explicitly state otherwise. As a result you may use any
compatible license (essentially any license) for your own programs developed with
Nim. You are explicitly permitted to develop commercial applications using Nim.

Please read the [copying.txt](copying.txt) file for more details.

Copyright © 2006-2017 Andreas Rumpf, all rights reserved.

[nim-site]: https://nim-lang.org
[nim-forum]: https://forum.nim-lang.org
[nim-issues]: https://github.com/nim-lang/Nim/issues
[nim-issues-easy]: https://github.com/nim-lang/Nim/labels/Easy
[nim-irc]: https://webchat.freenode.net/?channels=nim
[nim-travisci]: https://travis-ci.org/nim-lang/Nim
[nim-twitter]: https://twitter.com/nim_lang
[nim-stackoverflow]: https://stackoverflow.com/questions/tagged/nim
[nim-stackoverflow-newest]: https://stackoverflow.com/questions/tagged/nim?sort=newest&pageSize=15
[nim-gitter]: https://gitter.im/nim-lang/Nim
[nim-gratipay]: https://gratipay.com/nim/
[nim-bountysource]: https://www.bountysource.com/teams/nim
[nim-bitcoin]: https://blockchain.info/address/1BXfuKM2uvoD6mbx4g5xM3eQhLzkCK77tJ
[nimble-repo]: https://github.com/nim-lang/nimble
[nimsuggest-repo]: https://github.com/nim-lang/nimsuggest
[csources-repo]: https://github.com/nim-lang/csources
[badge-nim-travisci]: https://img.shields.io/travis/nim-lang/Nim/devel.svg?style=flat-square
[badge-nim-irc]: https://img.shields.io/badge/chat-on_irc-blue.svg?style=flat-square
[badge-nim-gitter]: https://img.shields.io/badge/chat-on_gitter-blue.svg?style=flat-square
[badge-nim-forum-gethelp]: https://img.shields.io/badge/Forum-get%20help-4eb899.svg?style=flat-square
[badge-nim-twitter]: https://img.shields.io/twitter/follow/nim_lang.svg?style=social
[badge-nim-stackoverflow]: https://img.shields.io/badge/stackoverflow-nim_tag-yellow.svg?style=flat-square
[badge-nim-gratipay]: https://img.shields.io/gratipay/team/nim.svg?style=flat-square
[badge-nim-bountysource]: https://img.shields.io/bountysource/team/nim/activity.svg?style=flat-square
[badge-nim-bitcoin]: https://img.shields.io/badge/bitcoin-1BXfuKM2uvoD6mbx4g5xM3eQhLzkCK77tJ-D69134.svg?style=flat-square
[pull-request-instructions]: https://help.github.com/articles/using-pull-requests/