Commit Graph

773 Commits

Author SHA1 Message Date
Pap Lorinc e640867238 Provide java.util.Collections#shuffle as extensions for collections in JS
#KT-2460
2017-10-12 06:06:26 +03:00
Ilya Gorbunov 0454bd9e28 Detect endianness when reinterpreting Float64 as two Int32
#KT-18264

Use Int32Array instead of Uint32Array since ints are required to be singed.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov aa3bfc55c3 Implement in JS nextUp(), nextDown(), nextTowards() and ulp extensions
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 480d4a0093 Make withSign(NaN) behave as in JVM
#KT-4900

Where only the sign of the result is undefined, but the absolute value is unchanged.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 132f2f88c2 Provide Double and Float bit conversion functions as extensions in JS and Common
Instance extension: Double/Float.toBits/toRawBits
Companion extension: Double/Float.Companion.fromBits

#KT-18264 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 044ccf1532 Introduce inverse hyperbolic functions
#KT-4900

Improve accuracy of JS polyfills of hyperbolic functions and expm1/log1p
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 86b23ffe49 Integer math functions and tests for them
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov a832db48f6 Float Math API
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov f3ea499d2c JVM-specific math functions and tests
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 7e48f8b180 Provide Double and Float bit conversion functions as extensions
Instance extension: Double/Float.toBits/toRawBits
Companion extension: Double/Float.Companion.fromBits

 #KT-18264 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 6373ac7ef0 Rename log to ln, log1p to ln1p, keep pow only as extension
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 805d1c90b7 Rename sgn to sign, add docs and tests
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov d0b12e3872 Use HALF_EVEN rounding mode for round()
Add docs and tests for rounding.

 #KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 5e9e6d5951 Common math tests and document for trigonometric functions and powers.
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 559255f38e windowed function: add default parameters, drop or keep partial windows, KEEP-11
Make step default to 1.
Add partialWindows boolean parameter defaulting to false to control
whether to keep partial windows in the end.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov c04b0072af Rename pairwise to zipWithNext, KEEP-11 2017-10-11 19:20:24 +03:00
Ilya Gorbunov c2cee2e405 Update binary api dump, rearrage bignumbers tests 2017-10-11 19:20:24 +03:00
Ilya Gorbunov b89e5b2708 Add missing api: radix overloads, mathContext and scale overloads, orNull overloads
Move string-to-number conversions and their tests near to existing ones

Add documentation and copyrights.
2017-10-11 19:20:24 +03:00
voddan e86e080088 KEEP-49: extending Kotlin API for BigInteger and BigDecimal 2017-10-11 19:20:24 +03:00
Ilya Gorbunov a8fef3a385 Provide MutableList.fill for JS, annotate new API with @SinceKotlin
#KT-8823 #KT-9010
2017-10-11 19:20:24 +03:00
Ilya Gorbunov bb22d6647b Introduce MutableList.fill and shuffle/shuffled extensions for JVM only
'shuffle' and 'fill' are inline only, but 'shuffled' is not.

#KT-8823 Fixed
#KT-9010 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 16d3d2f764 Make Regex class serializable on JVM
#KT-16447 Fixed

Refactor helper functions for serialization tests.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 18c7a01ab5 Add tests for windowed and chunked, fix precondition checks 2017-10-11 19:20:24 +03:00
Ilya Gorbunov c815ccfd6a Introduce 'pairwise' function, KEEP-11 2017-10-11 19:20:24 +03:00
Ilya Chernikov 628927782a Fix tests in the gradle environment 2017-09-19 21:37:09 +02:00
Ilya Gorbunov 095aacecac Minor, test: align assertion with the expectation message 2017-09-19 17:57:18 +03:00
Ilya Gorbunov 08052e63e9 Test to ensure fixed typed char array content[Deep]ToString, relates to #KT-16056 2017-09-13 20:53:17 +03:00
Ilya Gorbunov 599113b30f Fix internal KotlinVersion representation that caused invalid comparison 2017-09-06 18:45:33 +03:00
Ilya Gorbunov f10ea03173 Provide extension to get mutable iterator from the mutable map
#KT-18992 Fixed
2017-07-24 21:02:15 +03:00
Igor Chevdar fd380f7545 Split up test on map access onto two tests: stdlib & compiler box test 2017-07-12 15:12:33 +03:00
Igor Chevdar d7e4350d42 Ignored/fixed some tests for Kotlin/Native 2017-06-28 12:54:32 +03:00
Ilya Gorbunov ab70307cc0 Minor: refactor iterable tests 2017-05-05 18:01:02 +03:00
Marek Langiewicz 934b0b8c38 Fix List.takeLast for lists without RandomAccess 2017-05-03 16:38:15 +02:00
Ilya Gorbunov e0a4f9ba76 Rewrite precondition samples and refactor precondition tests
Precondition tests are shared for JS target.
Samples do not use assertFailsWith as expression, as it's going to be converted as a special template.
2017-04-21 21:13:25 +03:00
Zalim Bashorov c112542935 KJS: remove unnecessary test runners (mostly for stdlib)
Stdlib tests run separately via gradle.
2017-04-20 16:19:05 +03:00
Ilya Gorbunov 2db8714fc5 Fix null values being treated as missing in 'put' method of a specialized string-keyed map 2017-04-19 18:32:47 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov 4a5d8534c1 Fix array iterators to adhere to Iterator contract
#KT-17453 Fixed

Change expected exceptions in tests.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov 6af986cfdd Refactor serialization tests and move them to test/io package
Add tests for singleton deserializing.
2017-04-18 12:46:52 +03:00
Anton Bannykh 7d4c26c0c1 JS: fix maven SeleniumTest 2017-03-28 21:23:21 +03:00
Anton Bannykh 9b34e21619 JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).

The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Ilya Gorbunov 87c055cc61 Fix progression iterators to respect the Iterator contract.
#KT-16923 Fixed
2017-03-20 20:13:54 +03:00
Ilya Gorbunov e5a28311bc Fix infinite sequence being terminated prematurely when being iterated without calling hasNext
#KT-16922 Fixed
2017-03-20 20:13:54 +03:00
Ilya Gorbunov 31da36bedf Minor: Add test cases for adding and removing null value to/from set.
Fix unused value in removeAll test.
2017-02-08 20:13:22 +03:00
Ilya Gorbunov 33f3106157 Do not use Math in common code. 2017-01-30 19:44:51 +03:00
Anton Bannykh 77aa685496 JS: char boxing 2017-01-30 16:31:44 +03:00
Roman Elizarov a1571657f3 Updated test to experimental package 2017-01-27 23:24:13 +03:00
Roman Elizarov 8dc318dd92 Fixed KT-15963 (coroutines machinery should not use equals on results) 2017-01-27 23:24:13 +03:00
Denis Zharkov 246946bc18 Move buildSequence/buildIterator to kotlin.coroutines.experimental 2017-01-27 23:24:13 +03:00
Denis Zharkov 8fa8ba7055 Move coroutine-related runtime parts to kotlin.coroutines.experimental package
#KT-15975 Fixed
2017-01-27 23:24:13 +03:00