Ilya Gorbunov
5773594412
Reimplement ClosedRange.contains extensions to call interface contains method.
2016-12-08 20:50:07 +03:00
Ilya Gorbunov
4721dcd07c
Add specialization overloads for Float.rangeTo and Double.rangeTo to resolve them statically.
2016-12-08 20:49:10 +03:00
Ilya Gorbunov
f5cc53c157
Provide ComparableRange specializations for Double and Float.
...
#KT-4481
2016-12-08 20:47:24 +03:00
Ilya Gorbunov
eaf64fb225
MapTest: Uncomment cases that pass now, add more cases.
2016-12-08 20:34:57 +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
a6fb61f5c3
Fix various maven pom problems:
...
- Add relativePath to samples pom.
- Specify versions of plugins
2016-12-04 14:15:34 +03:00
Ilya Gorbunov
75d80acac9
Rework existing unit tests used as samples.
2016-12-02 22:41:25 +03:00
Ilya Gorbunov
57cef391ac
Create a separate project for stdlib samples.
2016-12-02 22:41:25 +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
21fba92c93
Annotate new number parsing functions with SinceKotlin.
...
#KT-8286, #KT-7930
2016-11-30 02:33:51 +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
410e85ef79
Minor: extract a couple of platform-specific functions.
2016-11-30 02:19:38 +03:00
Ilya Gorbunov
4d6c5bcdcf
Split API to separate overloads with radix parameter and without.
...
Remove unused radix parameter from toFloat and toDouble.
Update public API dump.
#KT-8286, #KT-7930
2016-11-30 02:19:36 +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
0a939a647f
Added optional radix parameter to string-parsing functions: String.toInt, String.toIntOrNull etc.
...
#KT-8286
2016-11-30 02:19:29 +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
ce9c981e26
Implemented String.toIntOrNull , String.toLongOrNull.
...
Rewrote `String.toShortOrNull` and `String.toByteOrNull` by delegating to `String.toIntOrNull`.
Added a regEx check into `String.toDoubleOrNull` to prevent throwing exceptions mostly.
#KT-7930
2016-11-30 02:19:26 +03:00
voddan
3d050322e0
Added String.toIntOrNull, etc
...
#KT-7930
2016-11-30 02:17:35 +03:00
voddan
fb51d21888
Extracted string-parsing extensions and their tests into separate files.
2016-11-30 02:17:35 +03:00
Ilya Gorbunov
0eba06405a
Use InputStream as another guess for estimated size in InputStream.readBytes()
2016-11-22 23:37:29 +03:00
Ilya Gorbunov
e41cbe6fe1
Check that the length of a file can be represented as Int.
2016-11-22 23:37:27 +03:00
Ilya Gorbunov
c90ee13656
Performance: use byte array buffer directly to read the entire contents of a file.
...
#KT-14883 Fixed
2016-11-22 23:37:05 +03:00
Ilya Gorbunov
6a70761783
Minor: normalize '@Test' annotation casing in all tests.
2016-11-21 18:20:33 +03:00
Ilya Gorbunov
50cd620f92
Remove java.util.* imports from common code.
2016-11-21 18:20:33 +03:00
Ilya Gorbunov
5c2fe13a89
Refer to java.util.Arrays fully-qualified in generated code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
fae5c88f22
Remove java.util references from the common code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
63535393e7
Move Comparator to kotlin.comparisons and make it imported by default.
...
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
090bd76ac9
Introduce type aliases for jvm collections in kotlin.collections
...
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
09072f6cdc
Remove toInt() conversion as it's hardly required.
...
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov
8de67d039b
Expose maximum version component value as a constant, increase it to 255.
...
Add tests for KotlinVersion, document remaining parts of API.
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov
5f7d779370
Introduce KotlinVersion API
...
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov
8feaaf4df0
Allow to annotate generated API with SinceKotlin and annotate new array functions.
2016-11-08 18:08:59 +03:00
Ilya Gorbunov
dceec89572
JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
f3da656d6e
contentEquals, contentHashCode, contentToString: Add js implementation and tests
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
a868eecb1a
Introduce contentEquals/HashCode/ToString for Arrays. Different methods for deep equals/hashCode/toString rather than overloads with a parameter, because most of the time it would be constant, and make these methods inline-only.
...
Make `contentEquals` infix function.
Add docs.
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
61ef26614d
Fixup after merge (temporary until collection typealiases are introduced in stdlib)
2016-11-08 03:56:39 +03:00
Ilya Gorbunov
a067888fed
Provide no-op members in JS ArrayList to work with capacity.
...
#KT-14637
2016-11-07 21:58:43 +03:00
Ilya Gorbunov
660dc94f7c
Move Closeable to its usage, move internal Serializable to kotlin package in JS, introduce internal typealias in kotlin.io in JVM.
2016-11-07 21:39:36 +03:00
Alexander Udalov
3db459c1d8
JS: drop Collections.reverse and java.util.Collections altogether
2016-11-07 12:27:54 +03:00
Alexander Udalov
e8fecea871
JS: drop Collections.max
2016-11-07 12:27:52 +03:00
Alexander Udalov
316fbd820b
JS: drop Collections.sort
2016-11-07 12:27:13 +03:00
Alexander Udalov
30a7790dca
Minimize references to java.util.Collections in stdlib sources
...
Only three usages are left in platform-independent code: in reverse, sort and
sortWith for mutable lists
2016-11-07 12:20:14 +03:00
Alexander Udalov
b52f67132e
Fix some warnings in JS-specific stdlib sources
2016-11-07 12:20:14 +03:00
Ilya Gorbunov
49ea0f5984
Relax generic variance in Array.flatten
2016-10-31 22:05:38 +03:00
Ilya Gorbunov
1c7196a1fb
Allow to reference internal API in stdlib tests
2016-10-26 17:47:15 +03:00
Ilya Gorbunov
8d76617094
Merge ReversedViews tests in one file as they can all run now in JS.
...
Make SynchronizedLazyValTest jvm-only.
2016-10-26 17:47:15 +03:00