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
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
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
67ef790abc
Move comparison related functions to kotlin.comparisons, update imports in stdlib.
2016-01-18 21:46:31 +03:00
Ilya Gorbunov
055c71e8d0
Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
...
#KT-9002 Fixed
2015-12-18 00:00:52 +03:00
Ilya Gorbunov
c7d08ea599
Remove *Raw method usages from tests
2015-11-28 07:20:25 +03:00
Ilya Gorbunov
794819cea2
StdLib cleanup: make calls non-infix
2015-11-21 00:54:10 +03:00
Ilya Gorbunov
838109c302
StdLib cleanup, deprecated symbol usage: replace end with endInclusive
2015-11-21 00:54:06 +03:00
Ilya Gorbunov
07654eb82b
StdLib cleanup, deprecated symbol usage: size() and length()
2015-11-21 00:54:05 +03:00
Ilya Gorbunov
1a0c2e2cf6
In-place sorting.
...
#KT-9034
2015-11-05 09:04:31 +03:00
Ilya Gorbunov
5e9b7b9e60
Collections.sort without comparator now uses natural order.
...
#KT-9771 Fixed
2015-11-05 09:03:30 +03:00
Ilya Gorbunov
4fc54a12b8
In-place reversing.
...
#KT-9034
2015-11-05 09:02:58 +03:00
Ilya Gorbunov
65a98d6968
Temporary drop mapNotNull and mapNotNullTo.
...
Disable mapNotNull tests
#KT-4410
2015-11-04 00:05:45 +03:00
Ilya Gorbunov
579ce8091c
Cleanup tests, specify type where it's ambiguous.
2015-10-27 21:48:27 +03:00
Alexey Tsvetkov
eae644c365
Remove isArrayOf reference from common JVM/JS test
2015-10-14 20:06:52 +03:00
Alexey Tsvetkov
62c25c0370
Replace is Array<T> with .isArrayOf<T>()
2015-10-14 18:36:53 +03:00
Ilya Gorbunov
db93532e7c
Deprecate merge and introduce instead zip with transform.
...
Add zip with transform for Strings.
2015-10-08 17:48:35 +03:00
Ilya Gorbunov
12d9beb3a4
Deprecate join (use joinToString instead)
...
#KT-6909
2015-10-08 17:48:33 +03:00
Ilya Gorbunov
404b228954
StdLib cleanup: replace fails with assertFails
2015-10-07 22:36:06 +03:00
Denis Zharkov
5cecaa6f87
Get rid of deprecated annotations and modifiers in stdlib (besides JS)
2015-09-18 10:14:28 +03:00
Ilya Gorbunov
84d3d42e05
Replace deprecated reverse method usages.
2015-08-27 11:45:44 +03:00
Ilya Gorbunov
ca798d8d71
Rename reverse to reversed.
...
#KT-8171
2015-08-27 11:45:30 +03:00
Ilya Gorbunov
b8badd59ba
Introduce reversed extension for Comparator.
2015-08-27 00:10:11 +03:00
Ilya Gorbunov
7d33599fc2
Parameterless nullsFirst and nullsLast and misc comparator combining functions.
2015-08-27 00:09:44 +03:00
Ilya Gorbunov
5a4e598ba7
Another approach for sorting nulls.
2015-08-27 00:09:31 +03:00
Ilya Gorbunov
d49a1973e5
Change null handling in compareValuesBy(a, b, functions). Provide nullsFirst() and nullsLast() to extend Comparator<T> to Comparator<T?>.
2015-08-27 00:09:17 +03:00
Ilya Gorbunov
63110dcdf8
Remove StdLibArraysTest and include collections/ArraysTest.kt into StdLibTestToJSTest smoke tests instead.
...
Move helper methods, so they are available in JS semantics tests.
2015-08-27 00:09:04 +03:00
Ilya Gorbunov
521e0b679d
Rename sortedDescendingBy to sortedByDescending
2015-08-27 00:08:50 +03:00
Ilya Gorbunov
002c3e850f
Tests for sorting methods.
2015-08-27 00:08:37 +03:00
Sergey Mashkov
0e25a5ea82
JS: arrayToString should use toString() instead of direct join to handle nulls properly
...
#KT-8663 Fixed
2015-07-31 14:28:30 +03:00
Ilya Gorbunov
d831509cee
Provide listOfNotNull method.
2015-07-24 04:34:31 +03:00
Ilya Gorbunov
da3ec891d0
Provide unzip method for Iterables, Arrays and Sequences of pairs.
...
#KT-5793 Fixed
2015-07-24 04:28:57 +03:00
Ilya Gorbunov
690a536734
Tests for minus operation for collections, sets, iterables and sequences.
2015-07-17 10:53:31 +03:00
Ilya Gorbunov
048a3ebcc1
Implement plus for sequence as operand and refactor plus tests.
2015-07-17 10:53:05 +03:00
Ilya Gorbunov
2c28c5a8e8
Define plusAssign operator for mutable collections.
...
#KT-4020 Fixed
2015-07-17 10:52:25 +03:00
Ilya Gorbunov
dd945f4d1a
Tests for plus on collections, sets, sequences.
2015-07-17 10:52:12 +03:00
Ilya Gorbunov
f3a19ebe11
StdLib deprecations cleanup: length, size, indices and other collection operations.
2015-06-29 17:06:20 +03:00
Ilya Gorbunov
a1d8e9d633
Provide dropLast and takeLastWhile methods. Optimize special cases of drop/take/dropLast/takeLast (when n is equal to zero or size of collection).
2015-06-04 16:32:25 +03:00
Ilya Gorbunov
9b17220baa
Provide dropLastWhile for Arrays, Lists and Strings.
2015-06-04 16:32:21 +03:00
Ilya Gorbunov
4fd1b46e91
Refactor JS tests: unified package name, test JS specific map implementations only in JS.
...
Add required files to build StdLibTestToJSTest.
Remove tests StdLibMapJsTest and StdLibSetJsTest because they are tested elsewhere.
2015-05-24 05:07:01 +03:00
Ilya Gorbunov
c95ba4da8e
Tests for specialized primitive implementations of sets and maps in JS.
2015-05-24 05:06:51 +03:00
Ilya Gorbunov
ebe578dbc5
Tests to ensure the behavior of the specialized empty List, Set, Map implementations is same as of non-specialized ones.
2015-05-24 05:03:46 +03:00
Ilya Gorbunov
b1255cf95b
2nd stage of split semantics change: remove deprecated String.split(String), rename splitBy back to split.
2015-05-09 01:11:32 +03:00
Ilya Gorbunov
5dacb5a745
Provide average() method for iterables, sequences and arrays.
...
#KT-3843 Fixed
2015-04-22 18:21:29 +03:00
Ilya Gorbunov
899a01e8c2
Rename sequence() extension to asSequence()
2015-04-22 17:57:20 +03:00
Ilya Gorbunov
be11394adf
Rename copyToArray() to toTypedArray().
2015-04-21 21:27:28 +03:00
Ilya Gorbunov
5eb3c0bb5e
Rename *array() factory methods to *arrayOf().
2015-04-21 21:27:26 +03:00
Ilya Gorbunov
043b27bfe5
Make more generic signature for reduce and reduceRight methods.
...
Fixes #KT-2287
2015-04-15 17:34:08 +03:00