Ilya Gorbunov
bc944961f1
Use internal published-api function to validate radix in string-number conversion functions.
...
#KT-8286
2016-12-14 17:20:44 +03:00
Ilya Gorbunov
2fa98323f1
Refactor: rename files.
2016-12-06 21:30:35 +03:00
Ilya Gorbunov
d5f5f88cda
Add number to string conversion with the specified radix.
...
#KT-8286
2016-12-06 21:30:35 +03:00
Ilya Gorbunov
dc57d69085
Improve onEach templates.
...
Add new functions to reference API.
Add tests for onEach
#KT-8220
2016-11-30 16:46:56 +03:00
Ilya Gorbunov
9b421eb7a4
Throw IllegalArgumentException instead of NumberFormatException on incorrect radix.
2016-11-30 02:20:33 +03:00
Ilya Gorbunov
3c80a7056a
Refactor local test dsl.
...
Add several cases and arabic digits conversion test.
2016-11-30 02:19:43 +03:00
Ilya Gorbunov
1b9dfffc13
Minor: normalize casing of Test annotation
2016-11-30 02:19:40 +03:00
Ilya Gorbunov
ce50c7f13d
Fix in test to deal with java 6 not accepting leading plus.
2016-11-30 02:19:33 +03:00
voddan
a8bd174cd0
Added tests for parsing with radix.
...
#KT-8286
2016-11-30 02:19:31 +03:00
voddan
87d010e038
Introduce local dsl for number parsing tests, improve test coverage.
...
#KT-7930
2016-11-30 02:19:27 +03:00
voddan
fb51d21888
Extracted string-parsing extensions and their tests into separate files.
2016-11-30 02:17:35 +03:00
Ilya Gorbunov
6a70761783
Minor: normalize '@Test' annotation casing in all tests.
2016-11-21 18:20:33 +03:00
Ilya Gorbunov
badbcd08de
Annotate explicitly stdlib tests, which must be excluded from JS stdlib tests with @JvmVersion, do not use file naming convention, use preprocessor instead.
2016-10-26 17:47:15 +03:00
Ilya Gorbunov
0ac461927c
Minor: Fix TODOs in stdlib tests
2016-10-18 17:13:17 +03:00
Laszlo Hornyak
6fda0816f3
buildString with initial capacity for the StringBuilder instance
...
this method helps save computation time when the developer knows or have a good
educated guess about the size of the generated string and have to use control
structures while filling the string builder
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com >
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com >
2016-08-10 18:23:32 +03:00
Ilya Gorbunov
4b533b297e
reified assertFailsWith available in kotlin-test for JS
...
#KT-11346
2016-04-27 18:22:20 +03:00
Ilya Gorbunov
f564adfdd4
Optimize trivial cases of CharSequence.repeat. Provide CharSequence.repeat for JS.
...
#KT-3064 Fixed
2016-02-26 01:23:30 +03:00
Ilya Gorbunov
3c35395cf7
Minor: refactor some tests to use nested classes.
2016-02-21 04:18:11 +03:00
Ilya Gorbunov
c243a2bdd5
In addition to extension String.format introduce String.Companion.format(format, args) to be used like in java.
2016-02-03 17:14:01 +03:00
Ilya Gorbunov
148b53fc62
Add UTF_32 charsets to Charsets object as lazy initialized properties.
...
#KT-10379 Fixed
2016-02-02 15:23:22 +03:00
Ilya Gorbunov
4f1418bb72
Verify index expectations for reduceIndexed/reduceRightIndexed
2016-01-31 02:45:05 +03:00
Gabriel Borges
d58efff974
Add foldIndexed and reduceIndexed groups of functions
...
- foldIndexed, foldRightIndexed, reduceIndexed and reduceRightIndexed have been added, in line with filterIndexed etc.;
- Test cases added appropriately for the new functions.
2016-01-31 02:45:02 +03:00
Ilya Gorbunov
c1ad82ff8c
Harden charset-as-string taking function deprecations.
...
Fix usages in compiler.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
dbcad08a35
Regex: MatchResult.groupValues do not exclude zeroth group, use the same indices as in groups collection.
...
Provide destructured property for destructured assignment.
2016-01-22 00:59:13 +03:00
Ilya Gorbunov
3459a24b0a
Regex: Introduce MatchResult.groupValues to get list of numbered group values exlcuding zeroth group with the entire match.
2016-01-22 00:56:08 +03:00
Ilya Gorbunov
b61bef324d
Make Char.category and directionality properties instead of functions.
...
Provide contains(Char) operator for CharCategory.
2015-11-21 00:54:30 +03:00
Ilya Gorbunov
775755dfac
Introduce String.toCharArray() instead of String.getChars()
...
Make special method conversion for java.lang.String.getChars() in J2K
2015-11-21 00:54:29 +03:00
Ilya Gorbunov
07654eb82b
StdLib cleanup, deprecated symbol usage: size() and length()
2015-11-21 00:54:05 +03:00
Ilya Gorbunov
008a8059cf
Introduce filterIndexed
...
#KT-9502 Fixed
2015-11-11 02:42:52 +03:00
Ilya Gorbunov
1400bdc09a
Do not allow removeSurrounding remove overlapping prefix and suffix.
2015-11-04 22:19:59 +03:00
Ilya Gorbunov
05fd2b012a
Provide overloads both for Strings and CharSequences of filter, filterNot, reversed and partition
2015-11-04 22:19:57 +03:00
Ilya Gorbunov
62d6bcaa6d
Provide overloads both for Strings and CharSequences of removePrefix, removeSuffix, removeSurronding, trim* and pad*, replaceRange & removeRange
2015-11-04 22:19:55 +03:00
Ilya Gorbunov
8c16fad8b1
Make more string tests cross-platform.
2015-11-04 22:19:48 +03:00
Ilya Gorbunov
d021a324aa
Test CharSequence extension methods both for String and StringBuilder
2015-11-04 22:19:43 +03:00
Daniel Rothmaler
67229401c6
Add set operator to make the work with StringBuilder more list-like.
...
Make StringBuilder.set jvm-only.
Move jvm-specific test.
2015-11-04 22:19:33 +03:00
Ilya Gorbunov
05615dd48b
Introduce String.toByte()
...
#KT-8833 Fixed
2015-11-04 22:19:22 +03:00
Ilya Gorbunov
9bbe0d67ff
Do not treat directory with copied test sources for js library as source root, as it confuses debugger under certain circumstances.
...
Remove duplicated test.
2015-11-04 22:19:20 +03:00
Ilya Gorbunov
43bb9347c6
Rename Regex.hasMatch to containsMatchIn, and add corresponding contains function to CharSequence.
2015-10-14 22:49:50 +03:00
Ilya Gorbunov
d1d865aa0f
Rename methods in Regex. Add matchEntire method to match entire string against regex.
2015-10-14 22:49:48 +03:00
Ilya Gorbunov
d860f335a3
JS: Make StringBuilder implement CharSequence and introduce secondary constructors.
2015-10-14 22:49:47 +03:00
Denis Zharkov
f0e3fd617d
Adjust testData to CharSequence.length transformation
2015-10-14 20:39:35 +03:00
Denis Zharkov
cb562e7ea5
Adjust JS backend to CharSequence.length transformation
2015-10-14 20:39:32 +03:00
Ilya Gorbunov
cac7bfc80b
Clarify some type in tests.
2015-10-14 18:26:46 +03:00
Ilya Gorbunov
af0a59dd02
Deprecate StringBuilder { } function, and introduce buildString { } instead.
...
#KT-7295 Fixed
2015-10-14 18:19:57 +03:00
Ilya Gorbunov
6d7cc0671e
Allow equals with ignoreCase parameter to take nullable Strings both as a receiver and a parameter.
...
#KT-9188
2015-10-14 18:19:56 +03:00
Ilya Gorbunov
12d9beb3a4
Deprecate join (use joinToString instead)
...
#KT-6909
2015-10-08 17:48:33 +03:00
Ilya Gorbunov
c54ffe39b1
Drop deprecated API: String operations.
2015-10-07 22:36:41 +03:00
Ilya Gorbunov
73e41fb216
StdLib cleanup: remove unused imports
2015-10-07 22:36:13 +03:00
Ilya Gorbunov
ff69b97030
StdLib cleanup: deprecated usages
2015-10-07 22:36:09 +03:00
Ilya Gorbunov
404b228954
StdLib cleanup: replace fails with assertFails
2015-10-07 22:36:06 +03:00