Ilya Gorbunov
4827aadcfd
Improve stability of lazy test, make some tests take less time
2017-12-26 23:14:09 +03:00
Ilya Gorbunov
10639eaf6a
Add pattern and options properties to common Regex
...
And add a test that accesses them and checks they work as expected.
2017-12-26 05:40:37 +03:00
Ilya Gorbunov
053f3b6ac0
Tests: use helper function to assert compile-time and run-time type check
...
To cleanup warnings about useless cast or type check that is always true.
2017-12-26 04:55:44 +03:00
Ilya Gorbunov
ecd42f14b3
Compile common stdlib tests against common stdlib
...
Declare platform-specific test utilities as expect.
2017-12-26 04:55:40 +03:00
Ilya Gorbunov
d8cd926a8c
Do not leak primitiveness of an array wrapped with asList
...
A primitive array wrapped in a List with asList had incorrect implementation of toArray method:
while it declares that an object array is returned, it returned a primitive array.
Therefore the methods such as `Collection.toTypedArray()` and its dependents
`ArrayList(collection)`, `Collection + Iterable` might behave incorrectly
having relied on `toTypedArray` returned an object array.
#KT-21828 Fixed
2017-12-18 15:50:15 +03:00
Ilya Gorbunov
0b9830248d
Restore original accessor signature as deprecated
...
The deprecated function is not operator because it covers cases where it was used in explicit form.
#KT-18789
2017-12-07 20:26:53 +03:00
Ilya Gorbunov
7efaa7cabc
Allow delegating val properties to out-projected MutableMap
...
Change generic signature of MutableMap.getValue, use 'out @Exact V' and `V1: V` types instead of single `in V`.
Fix affected IR generation tests.
#KT-18789 Fixed
2017-12-07 20:26:53 +03:00
Ilya Gorbunov
25988957f7
Remove duplicated string-to-number conversion tests
...
Actual ones are in StringNumberConversionTest.kt
2017-10-24 19:59:45 +03:00
Ilya Gorbunov
20b122c1dd
Use kotlin.test.Test instead of org.junit.Test in common stdlib tests
...
(and in jvm-only and js-only tests also)
2017-10-15 17:40:53 +03:00
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