Ilya Gorbunov
3f7a0d0845
Rename DurationMeasured to TimedValue, withMeasureTime to measuredTimeValue
...
Add measureTime docs
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
9deac2a591
Rename withComponents to toComponents and add two overloads of them
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
796ad29637
Add shortcuts to convert duration to milliseconds and nanoseconds
2019-06-18 04:02:32 +03:00
Ilya Gorbunov
8004c34e44
Reduce Duration API surface, add top-level docs
...
- toDuration(unit) extension instead of constructors
- toDouble/Long/Int(unit) function instead of inUnits()
- remove static factory functions
- remove MIN_VALUE/MAX_VALUE constants
2019-06-18 04:02:32 +03:00
Ilya Gorbunov
682430766b
Add ClockMark and measureTime tests with test clock
2019-06-18 04:02:32 +03:00
Ilya Gorbunov
ca29cfb88d
Implement MonoClock in JS
...
It uses either process.hrtime() in node.js or performance.now() in browser,
falling back to Date.now() if the latter is not available
2019-06-18 04:02:31 +03:00
Ilya Gorbunov
b816f50d4d
Implement and test default string formatting in JVM and JS
...
Relax Duration.toString tests for JS and Native rounding specifics
2019-06-18 04:01:55 +03:00
Ilya Gorbunov
c1f7fd0281
Duration: test toString in particular units
2019-06-18 03:59:52 +03:00
Ilya Gorbunov
b9c56af9ba
Change Duration value storage unit to ns
2019-06-18 03:59:52 +03:00
Ilya Gorbunov
690049c082
Duration unit tests
2019-06-18 03:59:52 +03:00
Ilya Gorbunov
7977b6cdb8
Implement DurationUnit in JS, add doc summary and conversion test
2019-06-18 03:59:51 +03:00
Abduqodiri Qurbonzoda
37dfbb3eba
Workaround unpaired surrogates replacement with ? (KT-31614)
2019-06-04 21:25:41 +03:00
Abduqodiri Qurbonzoda
c8a4fa58cd
Implement String to/from ByteArray conversion (KT-24810)
2019-05-06 15:54:28 +03:00
Abduqodiri Qurbonzoda
81d2d3cb6a
Implement String to/from CharArray conversion (KT-29265)
2019-05-06 15:54:28 +03:00
Svyatoslav Kuzmich
5da83889d9
Stdlib tests: Supporess NoInfer access instead of redeclaration
...
Stdlib annotation 'kotlin.internal.NoInfer' was redeclared in stdlib tests
so non-fried modules (kotlin-stdlib-jdk7, kotlin-stdlib-jdk8, etc.)
could access it.
IR deserializer does not support declaration duplicates (at least yet
for JS IR backend). Thus this commit removes this redeclaration and
suppresses errors on its usages instead.
2019-04-26 20:14:03 +03:00
nikita.movshin
65244b4bea
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Abduqodiri Qurbonzoda
a369496aca
Throw IOOB on invalid index in JS StringBuilder.get to adhere contract
2019-03-15 17:40:31 +03:00
Abduqodiri Qurbonzoda
ba61695a45
Check for index-out-of-bound in elementAt function (KT-30051)
2019-03-12 21:39:09 +03:00
Abduqodiri Qurbonzoda
be6c2d8c7d
Implement min max minOf maxOf functions for unsigned types (KT-30035)
2019-03-08 23:34:36 +03:00
Abduqodiri Qurbonzoda
bf83f0e070
Implement contains extension functions for URanges (KT-26378)
2019-03-08 23:34:35 +03:00
Abduqodiri Qurbonzoda
cb587893c0
Implement sorting extension functions for UArrays
2019-03-08 23:34:35 +03:00
Abduqodiri Qurbonzoda
c42dbb34ca
Implement drop, take & filter extension functions for UArrays
2019-03-08 23:34:35 +03:00
Abduqodiri Qurbonzoda
abb275775e
Implement map, flatMap, zip & groupBy extension functions for UArrays
2019-03-08 23:34:35 +03:00
Abduqodiri Qurbonzoda
503264b996
Implement folding extension functions for UArrays
2019-03-08 23:34:35 +03:00
Abduqodiri Qurbonzoda
7695b5e575
Implement sum extension function for UArrays (KT-28779)
2019-03-08 23:34:34 +03:00
Abduqodiri Qurbonzoda
690e35f11a
Implement reduce, forEach, min & max extension functions for UArrays
2019-03-08 23:34:34 +03:00
Abduqodiri Qurbonzoda
fc85781bfc
Implement asList, slice & sliceArray extension functions for UArrays
2019-03-08 23:34:34 +03:00
Abduqodiri Qurbonzoda
114736c09b
Implement reversing extension functions for UArrays
2019-03-08 23:34:34 +03:00
Abduqodiri Qurbonzoda
299fac8e2d
Implement conversion from typed array and collection to UArrays
2019-03-08 23:34:34 +03:00
Abduqodiri Qurbonzoda
bbaabb90e4
Implement any, all, none, count & sumBy functions for UArrays
2019-03-08 23:34:33 +03:00
Abduqodiri Qurbonzoda
512d986006
Implement index-requesting extension functions for UArrays
...
Contains implementations of `indexOf`, `lastIndexOf`, `indexOfFirst`,
`indexOfLast`, `lastIndex` and `indices` extension functions.
2019-03-08 23:34:33 +03:00
Abduqodiri Qurbonzoda
6cd9858147
Specialize plus operator for UArrays (KT-28397)
2019-03-08 23:34:32 +03:00
Ilya Gorbunov
908009bf42
Improve double-to-ulong conversion tests
...
#KT-27108
2019-02-27 17:49:41 +03:00
Abduqodiri Qurbonzoda
c1b523ddef
Fix UArray.containsAll(Collection<Any?>)
2019-02-25 21:58:53 +03:00
Abduqodiri Qurbonzoda
60e83383ad
Add containsAll(Any?) check to CollectionBehaviors
2019-02-25 21:58:53 +03:00
Abduqodiri Qurbonzoda
1b6b44c805
Implement conversion between floating point numbers and unsigned integers
...
KT-27108
2019-02-25 21:58:03 +03:00
Ilya Gorbunov
56672c2564
Ensure stable sorting in MutableList.sort/sortWith
...
MutableList.sortWith now works correctly in JS_IR backend too
#KT-12473
2019-01-17 18:38:23 +03:00
Ilya Gorbunov
51eb21d44b
Provide stable sorting when JS engine sorting doesn't look stable
...
#KT-12473
2019-01-11 20:53:29 +03:00
Ilya Gorbunov
de1d15aa9a
Improve test coverage for contentEquals and minOf/maxOf
2019-01-11 17:41:52 +03:00
Ilya Gorbunov
30c769c19a
Avoid hitting max argument limit in String(chars)
...
Rewrite CharArray to String conversions to appending chars one by one.
Refine parameter checking in String(chars, offset, length) to adhere to
the common exception contract and document it.
#KT-29003
2019-01-10 23:35:52 +03:00
Ilya Gorbunov
673844a059
Move coroutine tests to other stdlib-jvm tests
2018-11-28 06:05:02 +03:00
Ilya Gorbunov
5f4e8bf4fb
Correct abstract mutable collections declarations in kotlin-stdlib-common
...
Add SinceKotlin(1.3) to the new and substantially changed common declarations
#KT-28091
2018-11-09 13:39:44 +03:00
Ilya Gorbunov
2b699f8f07
Add a test for CharSequence/String.regionMatches
2018-11-01 17:51:24 +03:00
Pavel Punegov
f543170998
Increase tolerance for Float asin test
2018-10-10 19:05:44 +03:00
Sergey Bogolepov
2f1f32bbf4
Replace random val in companion object with top level val
2018-10-10 19:04:55 +03:00
Alexander Udalov
55c8b35eee
Remove unneeded default imports in stdlib and tests
2018-10-01 13:39:02 +02:00
Ilya Gorbunov
974837654e
Remove workaround for complex default value in Array.copyInto
...
#KT-22818
2018-09-22 18:24:00 +03:00
Ilya Gorbunov
aac96c476a
Rename sequence and iterator builder functions and their scope class
...
This introduces new functions instead of the existing sequence builders:
- `sequence` instead of `buildSequence`
- `iterator` instead of `buildIterator`
- `SequenceScope` instead of `SequenceBuilder`
The old functions were deprecated with error and made inline-only, and `SequenceBuilder` has been
made a deprecated typealias to `SequenceScope`.
Move sequence builders to `SequencesKt` facade class.
Replace sequence builder usages in stdlib and samples.
#KT-26678
2018-09-16 23:30:35 +03:00
Ilya Gorbunov
6bfb5c59a3
Make ResultTest common
...
Use custom exception type to avoid platform differences in toString implementation.
2018-09-14 15:32:25 +03:00
Ilya Gorbunov
b1c2daf1fe
Stdlib: fix name shadowing and names of overridden method parameters
2018-09-14 15:32:25 +03:00