Ilya Gorbunov
2c1d90c79d
Improve test coverage of map operations
2016-08-10 21:52:24 +03:00
Ilya Gorbunov
fb99919c59
Accept maps out-projected by key where possible.
2016-08-10 21:52:24 +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
e35a214eaf
Review fixes: special case of toMap for singleton map.
...
#KT-9108
2016-08-09 21:49:57 +03:00
Ilya Gorbunov
efc8f2c88a
Provide extensions to copy maps.
...
#KT-9108
2016-08-09 21:49:57 +03:00
Ilya Gorbunov
919c099a95
Minor: make test output less verbose
2016-07-01 18:50:53 +03:00
Ilya Gorbunov
22ee3a8dc1
Relax type parameter constraint for Closeable.use and AutoCloseable.use to allow nullable receiver.
...
#KT-12894 Fixed
2016-07-01 18:05:25 +03:00
Ilya Gorbunov
c5a208f3eb
Rearrange stdlib unit tests across packages.
...
Rearrange JS stdlib unit tests.
2016-06-18 16:50:32 +03:00
Ilya Gorbunov
d266f546f4
Remove obsolete and not relevant to stdlib tests
2016-06-18 16:50:32 +03:00
Ilya Gorbunov
9bfb226948
Drop inline-only extensions and hide non-inline-only ones that are available now as mapped methods of mapped builtins.
...
#KT-10887 Fixed
2016-05-13 18:14:52 +03:00
Ilya Gorbunov
15dcd3d9f9
Add tests for deserialization of collections persisted with kotlin 1.0
2016-05-12 21:20:54 +03:00
Ilya Gorbunov
f4f82656f7
Use list iterators instead of indexed access in operations on lists taking a lambda.
...
Related to #KT-9607
2016-04-29 22:21:19 +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
409094f0f7
Make stdlib functions dependent on reified is checks available in JS.
...
#KT-11346 Fixed
2016-04-27 18:22:20 +03:00
Ilya Gorbunov
d5d19f5595
Make Map.plus accept Map out-projected by key type as either operand (receiver or parameter).
...
#KT-11301 Fixed
2016-03-31 17:20:58 +03:00
Ilya Gorbunov
ab68b49a70
Introduce RandomAccess to JS.
...
Make EmptyList support RandomAccess.
#KT-10794
2016-03-30 21:06:18 +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
cbd38f007c
JS: Do not create a copy of already cloned vararg array.
...
JVM: Do not create copy of vararg array it it's already Object[].
2016-02-18 17:37:31 +03:00
Ilya Gorbunov
24edbc36df
Create at most one wrapper sequence for adjacent drop/take operations on sequences.
...
Based on PR #814 by Sargun Vohra
#KT-10821 Fixed
2016-02-14 16:46:46 +03:00
Ilya Gorbunov
6c7cefaae3
Use HALF_EVEN rounding mode by default for BigDecimal division operator.
...
#KT-10462 Fixed
2016-02-09 22:51:02 +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
Ilya Gorbunov
1357c77d0b
Minor: verify exception type of failed fold/reduce
2016-01-31 02:45:04 +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
d46501e11b
Make all remaining deprecations to be errors.
2016-01-27 18:34:32 +03:00
Ilya Gorbunov
4296b7f882
Breaking: make copyTo return target file instead of its size.
2016-01-27 00:29:09 +03:00
Ilya Gorbunov
8d02467e6d
Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>
...
#KT-9992 Fixed
2016-01-27 00:00:01 +03:00
Ilya Gorbunov
23080f78f7
Map.getOrPut: treat nulls as missing values.
2016-01-26 11:49:18 +03:00
Ilya Gorbunov
a49db730a9
Map.getOrElse: treat nulls as missing values.
2016-01-26 11:49:17 +03:00
Ilya Gorbunov
90a239e74c
Provide toMutableList as a replacement for toArrayList.
2016-01-26 11:49:15 +03:00
Ilya Gorbunov
564155734b
Introduce associateTo and associateByTo with the destination MutableMap to fill.
2016-01-26 11:49:12 +03:00
Ilya Gorbunov
e41bf687d9
Deprecate toLinkedMap
2016-01-26 11:49:10 +03:00
Ilya Gorbunov
8224a4e186
Rename toMap and toMapBy to associate and associateBy
2016-01-26 11:49:03 +03:00
Ilya Gorbunov
45c9cc4add
Breaking: Change File.copyTo contract to be similar to Files.copy from JDK8.
2016-01-26 11:49:02 +03:00
Ilya Gorbunov
67663c43ae
Introduce overwrite parameter to File.copyRecursively.
...
#KT-8924 Fixed
2016-01-26 02:26:33 +03:00
Ilya Gorbunov
7703252239
Provide groupBy and groupByTo with keySelector and valueTransform.
...
Rename parameters of groupBy, add type parameter for MutableMap to groupByTo.
2016-01-25 21:15:56 +03:00
Ilya Gorbunov
a78b08d9c7
Use generic coerceIn for nullable primitives, provide specialization for non-nullable ones.
...
Fix docs for coerceAtMost.
2016-01-24 06:44:13 +03:00
Ilya Gorbunov
f5f5a2dcc1
Move progression final element test to stdlib tests.
...
Less values are tested for iteration not to timeout in js tests.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
8bf638c60f
Drop deprecations: FileTreeWalk deprecated API elements.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
e9c14a02d3
Make FilePathComponents internal, temporary disable tests of internal API
2016-01-22 05:54:38 +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
b39b29dfea
Drop deprecations: io and threading functions.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
d1a5988bfc
Drop deprecations: complicated map delegates and kotlin.support.AbstractIterator.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
85a02d40c6
Drop hidden declarations provided for binary compatibility
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
91f4cf0ebc
Drop Progression<T> and its deprecated properties: start, end, increment.
...
Drop deprecated range extensions.
Make progression constructors private.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
6dd8470835
Drop deprecated primitive ranges and progressions: for Byte and Short
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
300a4be060
Deprecate Map.minus and minusAssign operators.
...
Disable tests failing in JS.
2016-01-22 01:13:33 +03:00
Ilya Gorbunov
7896e58afc
Rename sequence function to generateSequence
2016-01-22 01:13:31 +03:00