Commit graph

474 commits

Author SHA1 Message Date
Sebastian Wilzbach
d81030ab8a convert docstring examples to unittests 2016-03-03 15:24:26 +02:00
Basile Burg
1d7920d383 fixed issue 15596 2016-02-29 00:16:21 +01:00
Steven Schveighoffer
b0acb7a394 Fix remaining import deprecation messages 2016-02-22 16:03:12 -05:00
Martin Nowak
ce2ac192c9 fix incorrect imports/fqn usages
- mostly of the form `import a.b : sym; a.b.sym();`, which is wrong b/c
  selective imports do not add the module to the current scope
2016-02-20 14:41:44 +01:00
Jonathan M Davis
6c71d3e41e Merge pull request #3998 from klickverbot/fix-toutf-compare-tests
Fix testAliasedString() unit test helper
2016-02-14 06:10:21 -08:00
David Nadlinger
6b0be3b89f Fix testAliasedString() unit test helper
Many of the functions for which this wrapper is used return
string ranges. Comparing these for object identity does not
make a lot of sense.

This is actually an issue, because toUTF, which is used in quite
a few of the tested functions, contains a void-initialized buffer,
so the identity comparison is not guaranteed to succeed. The tests
just so happen to pass on current DMD regardless, but this is not
the case for an optimized LDC build.
2016-02-14 00:28:41 +01:00
David Nadlinger
3667b1e03d lineSplitter: Remove gratuitous filesystem access from unit test
The test assumed that the unit test runner would be executed from
the Phobos root directory, which is neither specified anywhere,
nor the case for the LDC build system.
2016-02-13 23:12:56 +01:00
Andrei Alexandrescu
0d1a9288c2 Merge pull request #3894 from adamdruppe/import_empty
publically import empty too because users expect it
2016-01-12 09:45:37 -05:00
Brian Schott
9df3aed5a5 Merge pull request #3848 from JackStouffer/string
Updated std.string.capitalize to use std.uni.asCapitalized internally
2016-01-08 13:35:14 -08:00
Adam D. Ruppe
2a235758a7 publically import empty too because users expect it 2015-12-31 10:44:05 -05:00
Robert burner Schadek
98441e265d std.string.index_unittest_examples
* added unittest doc examples for indexOf lastIndexOf

small update

indexOf rearranging

lastIndexOf

more shuffeling

jakobovrum

some update and more testing
2015-12-16 16:46:36 +01:00
k-hara
e864e53adc fix property enforcement 2015-12-04 15:42:53 +09:00
Jack Stouffer
1c5b5ce162 Updated capitalize to use asCapitalized 2015-12-02 12:06:22 -05:00
Jack Stouffer
4aefb6addc added entabber to shortcuts 2015-12-02 11:54:24 -05:00
Lionello Lunesu
be227ef595 Fixed some doc warnings 2015-11-17 09:21:52 +08:00
Andrei Alexandrescu
2cdb9c4eec Merge pull request #3795 from JackStouffer/isNumeric
Add unittest examples to std.string.isNumeric
2015-11-11 23:14:05 -05:00
Robert burner Schadek
ba8d5e70ba std.string.lineSplitter_unittest_example
* added unittest doc examples for indexOf lastIndexOf

fixup

fix

another version
2015-11-08 19:08:49 +01:00
Dmitry Olshansky
6b0aa3c349 Merge pull request #3781 from burner/std.string.leftJustify_unittest_example
std.string.leftJustify_unittest_example
2015-11-07 15:34:20 +03:00
Dmitry Olshansky
57facbbfed Merge pull request #3782 from burner/std.string.rightJustify_unittest_example
std.string.rightJustify_unittest_example
2015-11-07 14:52:35 +03:00
Dmitry Olshansky
ce70770170 Merge pull request #3783 from burner/std.string.center_unittest_example
std.string.center_unittest_example
2015-11-07 14:29:10 +03:00
Jack Stouffer
71e54dbc47 add unittest examples to isNumeric 2015-11-06 10:00:25 -05:00
Jack Stouffer
016d5a0074 Add unittest example to wrap 2015-11-04 10:08:54 -05:00
Robert burner Schadek
86a9f25e78 std.string.center_unittest_example
* added unittest doc examples for center
2015-10-28 15:10:22 +01:00
Robert burner Schadek
434eb1248c std.string.rightJustify_unittest_example
* added unittest doc examples for rightJustify
2015-10-28 15:01:52 +01:00
Robert burner Schadek
bcb492fcd7 std.string.leftJustify_unittest_example
added unittest doc examples for leftJustify
2015-10-28 14:57:26 +01:00
Martin Nowak
0e95f6723a Merge remote-tracking branch 'upstream/stable' into merge_stable 2015-10-27 15:55:59 +01:00
Andrei Alexandrescu
44a9bd0c27 Merge pull request #3772 from burner/std.string.capitalize_unittest_example
std.string.capitalize_unittest_example
2015-10-27 09:53:29 -04:00
Martin Nowak
0a9f9ccc3e fixup for string-like overloads
- undocument overloads for aliased/static strings
- make std.traits helpers phobos internal
- rename isStringLike to isConvertibleToString for clearer documentation
- rename peelStringLike to convertToString
- fix a few staticMap!(selectString) uses in std.path
2015-10-26 19:50:08 +01:00
Robert burner Schadek
93511d5d22 std.string.capitalize_unittest_example
* added unittest doc example

some attributes
2015-10-26 15:03:30 +01:00
Robert burner Schadek
45dbe146ed std.string.splitLines_unittest_example
* added unittest doc example
2015-10-26 14:02:24 +01:00
Martin Nowak
34097e8595 std.string fixes for string-like types
- consolidate tests
- add a few missing overloads
2015-10-25 19:28:08 +01:00
Martin Nowak
a089ec3ca9 Merge remote-tracking branch 'upstream/pr/3745' into stable 2015-10-22 15:02:49 +02:00
Robert burner Schadek
4ceef88236 std.string.column_alias_string_fix
make column take custom types again that have an alias this to string

forgot auto ref
2015-10-21 13:43:13 +02:00
Martin Nowak
d947b8190b consistently handle StringTypeOf overloads
- use auto ref to avoid expensive copies
- leave the overloads undocumented
- move them below the real implementations
- use explict template instantiation to avoid casts
- had to factor out LineSplitter b/c of fwd
  reference complaints by the compiler
2015-10-21 13:28:54 +02:00
Martin Nowak
287d483645 Merge pull request #3742 from burner/std.string.stripRight_alias_string_fix
std.string.stripRight_alias_string_fix
2015-10-21 13:27:07 +02:00
Martin Nowak
2b0251a322 Merge remote-tracking branch 'upstream/pr/3747' into stable 2015-10-21 12:47:00 +02:00
Martin Nowak
bc14b18f6f add is(StringTypeOf!S) for better error msgs 2015-10-21 12:44:38 +02:00
Martin Nowak
805710c951 Merge pull request #3746 from burner/std.string.splitLines_alias_string_fix
std.string.splitLines_alias_string_fix
2015-10-21 12:20:50 +02:00
Martin Nowak
f7951817a8 Merge pull request #3744 from burner/std.string.entab_alias_string_fix
std.string.entab_alias_string_fix
2015-10-21 12:18:13 +02:00
Martin Nowak
3ecea836cb Merge pull request #3743 from burner/std.string.stripLeft_alias_string_fix
std.string.stripLeft_alias_string_fix
2015-10-21 12:17:39 +02:00
Martin Nowak
9e3589e0cb Merge pull request #3741 from burner/std.string.strip_alias_string_fix
std.string.strip_alias_string_fix
2015-10-21 12:16:51 +02:00
Robert burner Schadek
8dc29bff62 std.string.capitalize_alias_string_fix
make capitalize take custom types again that have an alias this to string
2015-10-19 11:33:11 +02:00
Robert burner Schadek
3a5872cae4 std.string.splitLines_alias_string_fix
make splitLines take custom types again that have an alias this to string
2015-10-19 11:32:14 +02:00
Robert burner Schadek
d06e6277e4 std.string.entab_alias_string_fix
make entab take custom types again that have an alias this to string as auto
ref
2015-10-19 11:29:55 +02:00
Robert burner Schadek
eac977ab85 std.string.stripLeft_alias_string_fix
make stripLeft take auto ref custom types with to string alias

forgot a {
2015-10-19 11:25:41 +02:00
Robert burner Schadek
e1dfc3b331 std.string.stripRight_alias_string_fix
make stripRight take auto ref custom types with to string alias
2015-10-19 11:23:58 +02:00
Robert burner Schadek
2ef09b95a3 std.string.strip_alias_string_fix
make strip take custom types again that have an alias this to string

test stuff
2015-10-19 11:22:41 +02:00
Robert burner Schadek
a2b5fb5afa std.string.soundexer_alias_string_fix
make soundexer take custom types again that have an alias this to string
2015-10-19 11:19:57 +02:00
Brian Schott
67c95e6de2 Merge pull request #3715 from dcarp/AliasSeq
Rename obsolete TypeTuple to AliasSeq
2015-10-16 20:59:56 -07:00
Robert burner Schadek
c6ea3e5efb std.string.indexOf_rangifed_fixup
make indexOf consistend and accept auto ref ranges

ditto
2015-10-15 10:49:07 +02:00