summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fixes #16325 [backport:1.4] (#18784)Andreas Rumpf2021-09-021-0/+20
|
* sequtils now support strict effect tracking (#18782)Andreas Rumpf2021-09-021-0/+5
|
* Fix initrand to avoid random number sequences overlapping (#18744)Tomohiro2021-09-022-4/+30
| | | | | | | | | | | | | | | | | | | | | | | * Fix initrand to avoid random number sequences overlapping * Minor fix * Fix compile error on js backend * Disable new test for js backend * Minor fix * tempfiles module uses random.initRand() * Remove unused module import from lib/std/tempfiles.nim * Initialize baseState in initRand() * Run tests/stdlib/trandom.nim from tests/test_nimscript.nims * baseState is initialized only with sysrand.urandom and quit if failed * Add comments
* strict effects (#18777)Andreas Rumpf2021-09-0210-22/+124
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* fix #9778 (pairs iterator calling a helper proc with tuple return type will ↵flywind2021-09-021-0/+256
| | | | | | | | | | | cut the iterator yield into half) (#18767) * test someSymFromImportTable * Update compiler/lookups.nim * test nkTupleConstr * use isConstExpr * add tests * add comments and todo * use todo
* Implement RFC-413 (#18749)Juan Carlos2021-08-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | * Implement RFC 413 * Implement RFC 413 * Implement RFC 413 * Implement RFC 413 * https://github.com/nim-lang/Nim/pull/18749#discussion_r696320995 * Update lib/js/dom_extensions.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/js/dom_extensions.nim * https://github.com/nim-lang/Nim/pull/18749#discussion_r696913310 Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #14511 [backport:1.4] (#18732)Dankr4d2021-08-251-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | * fixes #14511 [backport:1.4] Signed-off-by: Dankr4d <dude569@freenet.de> * Replaced fix with code from alaviss, for better readability, with small changes. Signed-off-by: Dankr4d <dude569@freenet.de> * - Specified output in test. Signed-off-by: Dankr4d <dude569@freenet.de> * Replaced case in nnkRecCase with a simpler version, which just adds the last son. Signed-off-by: Dankr4d <dude569@freenet.de> * Update tests/macros/t14511.nim * Update tests/macros/t14511.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix RFC #341: dot-like operators are now parsed with same precedence as `.` ↵Timothee Cour2021-08-252-0/+28
| | | | | | | | | | | | | | | | | | | | | (#18711) * fix RFC #341: dot-like operators are now parsed with same precedence as `.` * fixup * [skip ci] address comment in changelog * address comment * update grammmar * add manual entry * fixup * -d:nimPreviewDotLikeOps * address comment to unblock PR: move nimPreviewDotLikeOps out of config/config.nims
* Fix #18718 (#18731)konsumlamm2021-08-231-42/+51
| | | Update tests
* Implement RFC-391 (#18585)Juan Carlos2021-08-221-1/+0
|
* replace wrt with proper word (#18724)flywind2021-08-221-1/+1
| | | | | * what does wrt mean? * clarify
* fix deprecated example (#18721)flywind2021-08-211-7/+15
|
* add testcase for overloadable_enums (#18722)flywind2021-08-211-0/+29
| | | | | * add testcase for overloadable_enums * link
* sigmatch: support optional params with last block arg(s) (#18631)Timothee Cour2021-08-201-0/+81
| | | | | | | * sigmatch: support optional params with last block arg * add tests * works with multiple block args * cleanup * address comment
* fix #18627(Program segfaults with ARC when using openArray[string]) (#18713)flywind2021-08-191-0/+24
| | | | | | | * fix #18627 * add testcase * rename * another * remove tyVarargs
* Add ceilDiv to math (#18596)Tomohiro2021-08-191-0/+40
| | | | | | * Use assert in runnableExamples and improve boundary check * Add more tests for ceilDiv * Fix comment in ceilDiv * Calling ceilDiv with int type T such like sizeof(T) > 8 is error
* improvements to `addInt` and `$` for integer types (#18592)Timothee Cour2021-08-193-78/+62
| | | | | | | | * improvements to $(SomeInteger) and addInt * remove mIntToStr, mInt64ToStr * improvements * fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode * rm tests/system/tstrmantle.nim * revert compiler/jsgen.nim for -d:nimVersion140
* asynchttpserver: ipv6 support (#18706)Emery Hemingway2021-08-181-1/+1
| | | Fix #18705
* fix #18702(fix `parseutils.parseFloat`) (#18703) [backport:1.0]flywind2021-08-161-2/+11
| | | | | * fix #18702 * Apply suggestions from code review
* properly fix #10053 ; `FieldDefect` msg now shows discriminant value + ↵Timothee Cour2021-08-132-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lineinfo, in all backends (c,vm,js) (#11955) * fix #10053 FieldError for vm * fixup * FieldError now also shows runtime value of discriminant * fix field error reporting in vm * also report culprit line info in err msg * fix errors for newruntime 2 * fix for js * fixup * PRTEMP4 * works * works * works perfect * refactor * std/private/repr_impl * suppport --gc:arc * cleanup * refactor * simplify * simplify * simplify * fixup * move out compiler.vmgen.genCustom * fixup * fixup * add tests * revert compiler/debugutils.nim * simplify reprDiscriminant * fixup * lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim * try to fix D20210812T165220 * honor --declaredlocs * control toFileLineCol via --declaredlocs
* fix a sqlite bug (#18669)flywind2021-08-121-0/+28
|
* fix #18670 quoteShellCommand, quoteShell, quoteShellWindows on windows (#18671)Timothee Cour2021-08-121-1/+12
|
* fixes #18643 [backport:1.0] (#18678)Andreas Rumpf2021-08-121-0/+11
|
* fix: `var a{.foo.} = expr` inside templates (refs #15920) (except when `foo` ↵Timothee Cour2021-08-113-2/+75
| | | | | | | | | | | is overloaded) (#13869) * fix: `var a{.foo.} = expr` inside templates * add test * improve tdecls test * improve tests * add failing test * PRTEMP * fixup
* Only allow IPv4 literals in strict form (#18656)Christian Ulrich2021-08-082-41/+84
| | | | | | | | | | | | | * Only allow IPv4 literals in strict form The strict form as defined in RFC 6943, section 3.1.1 only allows the dotted form ddd.ddd.ddd.ddd of IPv4 literals, where ddd is a one to three digit decimal number between 0 and 255. Until now octal numbers (with a leading zero) were interpreted as decimal numbers which has security implications, see CVE-2021-29922 and CVE-2021-29923. * Update lib/pure/net.nim Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* improve several tests in testament (#18635)Timothee Cour2021-08-086-38/+37
| | | | | | | | | | | * silence error output from template_various.nim * any => auto in tests * avoid showing failed for parseSpec since this is expected behavior in 2 cases: tincludefile.nim, tnav1.nim * enforce InheritFromException * fixup
* make proc names consistent (#18626)flywind2021-08-016-6/+6
| | | | | * rename `endswith` to `endsWith` * rename
* fix #18620 (#18624)flywind2021-08-011-0/+17
| | | | | * fix #18620 * add testcase
* exportC => exportc (#18625)Timothee Cour2021-07-311-1/+1
|
* Remove tracking of environment from osenv.nim v2 (#18575)Timothee Cour2021-07-293-27/+67
| | | | | | | | | | | | | * Remove unnecessary environment tracking * try to fix windows * fix delEnv * make putEnv work on windows even with empty values; improve tests: add tests, add js, vm testing * [skip ci] fix changelog Co-authored-by: Caden Haustein <code@brightlysalty.33mail.com>
* various small documentation improvements (#18602)Miran2021-07-281-5/+5
|
* implements overloadable enum values; WIP (#18470)Andreas Rumpf2021-07-282-1/+49
| | | | | * implements overloadable enum values * simpler code
* support same-line doc comments in routines (#18595)Timothee Cour2021-07-271-0/+27
| | | | * support same-line comments in routines * remove assert as per review comment
* fixes #18543 (#18601)Andreas Rumpf2021-07-271-12/+13
| | | | | * fixes #18543 * make tests green again
* fixes #18579 (#18600)Andreas Rumpf2021-07-271-0/+26
|
* Fixed const tuples in inferred generics (#18598)Jason Beetham2021-07-271-0/+14
|
* fixes #18565 (#18593)Andreas Rumpf2021-07-273-0/+19
| | | * fixes #18565
* fix #18578 (#18580)flywind2021-07-272-0/+23
| | | | | | | | | | | | | * fix #18578 * add tests * tiny * apply changes * typo * add removeStaticFile
* followup #18453 (#18582)Timothee Cour2021-07-252-17/+17
|
* rename nimFpRoundtrips => nimPreviewFloatRoundtrip (#18566)Timothee Cour2021-07-233-7/+7
|
* std/random: fix overflow bugs; fixes #16360; fixes #16296; fixes #17670 (#18456)Timothee Cour2021-07-231-1/+62
|
* Replace calls to `putenv` with `setenv` (#18530)Caden Haustein2021-07-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * Replace calls to C `putenv` with C `setenv` to remove possible memory leaks * Add test of correct behaviour on invalid input * Fix style in tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Add comment with bug number to tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Fix possible msvc arch issues Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Fixed template const tuple unpacking (#18562)Jason Beetham2021-07-231-0/+10
|
* mitigates #12815 (#18557)Andreas Rumpf2021-07-221-2/+15
| | | | | | | | | * mitigates #12815 * Update doc/nimc.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #12815 (#18554)Andreas Rumpf2021-07-221-0/+13
|
* fixes #18550 (#18553)Andreas Rumpf2021-07-211-1/+9
| | | | | * fixes #18550 * update the manual to reflect reality
* add testcase for #6499 #12229 #7172 (#18547)flywind2021-07-212-0/+40
|
* undo RFC #294, it breaks code for no good reason, the compiler can wa… ↵Andreas Rumpf2021-07-211-5/+3
| | | | | | | | | | | | | (#18546) * undo RFC #294, it breaks code for no good reason, the compiler can warn about the construct instead * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * enable test case Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #18469 (#18544)Andreas Rumpf2021-07-201-0/+44
| | | | | * fixes #18469 * Update compiler/injectdestructors.nim
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-206-42/+117
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string