Commit graph

183 commits

Author SHA1 Message Date
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
Steven Schveighoffer
adaba541eb Remove version(unittest) imports to avoid extra imports in user code. 2018-04-12 15:46:56 -04:00
Sebastian Wilzbach
e9e6ca4039 std.algorithm.{searching,sorting}: prepare for -dip1000 2018-04-06 05:15:06 +02:00
Nathan Sashihara
c1d1c0e874 Issue 18715 - Non-documented unittests should not use unpredictableSeed or default Random alias 2018-04-04 18:08:00 -04:00
Sebastian Wilzbach
87301eb1b5 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-03-25 18:23:14 +02:00
Sebastian Wilzbach
e7a8110ad3 Fix Ddoc error in the quickoverview of std.algorithm.sorting 2018-03-16 11:23:29 +01:00
Jack Stouffer
5b74692bf8
Update sorting.d 2018-03-12 10:10:59 -04:00
The Dlang Bot
78f7209c4a
Merge pull request #6156 from wilzbach/fix-8341
Fix Issue 8341 - topN(zip()) doesn't work
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-03-12 14:07:43 +01:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Sebastian Wilzbach
ede44cbc63 Fix Issue 8341 - topN(zip()) doesn't work 2018-02-11 01:24:18 +01:00
Jack Stouffer
18cbb29b04 Replaced version(unittest) blocks with version(StdUnittest) 2018-02-01 19:56:59 -05:00
Sebastian Wilzbach
7fb3d4249f Remove references to STL 2018-01-30 16:08:20 +01:00
Sebastian Wilzbach
8227e00cd9 Manual fixup 2017-12-29 01:48:45 +01:00
Sebastian Wilzbach
fc0c29f3a2 Markdownify std.algorithm
Done with: https://github.com/wilzbach/dscanner-fix/blob/master/d_code_markdown.d
2017-12-29 01:17:40 +01:00
Johan Engelen
fd009c7434
Expand topN testcase
Passing the comparison operation as string "a < b" is tested a few lines up. This adds a test for passing a lambda function.
2017-12-15 00:18:25 +01:00
Johan Engelen
acb4c7838c
Fix intentional discarding of return value in topN
This fixes a warning one gets when compiling with warnings enabled:
"phobos/std/algorithm/sorting.d(3122): Warning: calling testcase.foo.__lambda1 without side effects discards return value of type bool, prepend a cast(void) if intentional"

Testcase that fails compilation with `-w`:
```
import std.algorithm.sorting;

auto foo() {
    int[] v = [ 25, 7, 9, 2, 0, 5, 21 ];
    return topN!((a, b) => a > b)(v, 100);
}
```
2017-12-15 00:10:49 +01:00
Sebastian Wilzbach
df6365092a Replace body keyword with its replacement: do
Automatic replacement with

    sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Sebastian Wilzbach
97a2c88175 Move public unittest below their respective declaration 2017-11-20 14:17:41 +01:00
RazvanN7
3a4f83577e Get rid of unused variables in std/algorithm 2017-08-02 17:30:16 +03:00
The Dlang Bot
739c40957c Merge pull request #5151 from wilzbach/static_if_sorting
[Static if] replace overload constraints with static if (sorting.d)
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-07-17 21:40:42 +02:00
Sebastian Wilzbach
e3c91711a1 Fix random coverage in std.algorithm.sorting 2017-07-07 21:40:59 +02:00
Sebastian Wilzbach
b4e1043a96 makeIndex: Remove the explicit casting from the foreach loop 2017-07-07 14:45:50 +02:00
Sebastian Wilzbach
2267cf2620 makeIndex: fix special case for uint 2017-07-07 14:37:50 +02:00
Martin Nowak
54bda1e5bc fix Issue 17616 - makeIndex cannot fully use range of index type 2017-07-07 14:13:48 +02:00
Sebastian Wilzbach
5facd9b674 Remove unused label 2017-06-19 13:37:55 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
2070d867dd Sort multiple packages within one line 2017-06-12 08:18:25 +02:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
Sebastian Wilzbach
59508c4949 [Static if] replace overload constraints with static if (sorting.d) 2017-05-05 12:13:16 +02:00
The Dlang Bot
8146e88326 Merge pull request #5210 from wilzbach/std-algorithm-disable-quick-index
std.algorithm: remove quickIndex, fix outdated book tables & HTML links
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-03-03 15:35:24 +01:00
Jack Stouffer
e554764c01 Merge pull request #5216 from wilzbach/unluckily-phobos
Replace LUCKY links with actual links
2017-03-01 15:17:19 -05:00
Jack Stouffer
2e90b8ba16 Remove unused debug writelns in std.algorithm 2017-03-01 09:47:27 -05:00
Sebastian Wilzbach
b3bf38e6d6 std.algorithm: remove quickIndex, fix outdated book tables & HTML links 2017-03-01 03:59:48 +01:00
Sebastian Wilzbach
b46bd2951f Derandomize std.algorithm.sorting 2017-03-01 03:04:00 +01:00
Sebastian Wilzbach
d548e8830a Replace LUCKY links with actual links 2017-02-28 23:46:54 +01:00
Jack Stouffer
f2b5834172 Linked to the definition of forward and bidirectional ranges where they're mentioned in std.algorithm 2017-02-26 11:44:55 -05:00
Jack Stouffer
7d4ac19030 Linked to the definition of input ranges where they're mentioned 2017-02-25 19:18:54 -05:00
Sebastian Wilzbach
203755d296 Automatically add spaces to binary operators (>>)
command:

sed -E "s/([[:alnum:]]) >> ([[:alnum:]])/\1 >> \2/g" -i **/*.d
sed -E "s/([[:alnum:]])>> ([[:alnum:]])/\1 >> \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) >>([[:alnum:]])/\1 >> \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
ef7be4b60d Automatically add spaces to binary operators (<<)
command:

sed -E "s/([[:alnum:]]) << ([[:alnum:]])/\1 << \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<< ([[:alnum:]])/\1 << \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <<([[:alnum:]])/\1 << \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
d905ef53b1 Automatically add spaces to binary operators (<=)
command:

sed -E "s/([[:alnum:]]) <= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <=([[:alnum:]])/\1 <= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Andrei Alexandrescu
30724e67d9 Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
Martin Nowak
19641412f6 Merge remote-tracking branch 'upstream/master' into stable 2017-01-07 04:00:22 +01:00
WalterWaldron
40606feece Fix unstable sort documentation.
Noticed this here: https://dlang.org/library/std/algorithm/sorting/sort.html
2016-12-30 03:04:50 -05:00
Sebastian Wilzbach
e2025c2c34 Add public examples to std.algorithm 2016-12-20 04:14:10 +01:00
Per Nordlöw
28153fb3c6 Make merge with bi-directional and have infiniteness and more docs 2016-12-19 09:10:47 +01:00