Commit Graph

18 Commits

Author SHA1 Message Date
Ilya Gorbunov a225842f9b Test that known Floats can fit in FloatArray without over/underflow
But some precision loss can still happen in JS.

Relates to KT-24975
2020-04-02 04:04:04 +03:00
Ilya Gorbunov d88d2cb058 Test new Double/Float constants
Split test expectations based on actual support of enforced Float range

KT-29182, KT-13887
2020-04-02 04:04:04 +03:00
Ilya Gorbunov f8724654a1 Bit query and bit rotation functions for Int, Long, Short, Byte
#KT-12749
2019-07-08 19:09:32 +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
Ilya Gorbunov 5f3a7f0147 Use Char.MIN_VALUE and MAX_VALUE in tests 2018-08-30 14:55:45 +03:00
Ilya Gorbunov 92e149fa40 Add tests for SIZE_BYTES and SIZE_BITS constants
#KT-8247 Fixed
2018-08-30 14:55:43 +03:00
Ilya Gorbunov e21c235bbb Add or update copyrights in the standard library sources 2018-04-26 21:57:50 +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
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 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 c43e4f6682 Uncomment some assertions for overflow behavior that now can pass in JS 2016-12-23 18:14:32 +03:00
Ilya Gorbunov 6a70761783 Minor: normalize '@Test' annotation casing in all tests. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov c5a208f3eb Rearrange stdlib unit tests across packages.
Rearrange JS stdlib unit tests.
2016-06-18 16:50:32 +03:00
Ilya Gorbunov de11ed4fc6 Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
2015-12-24 06:17:03 +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 1cf4a407d1 JS: Provide MIN_VALUE and MAX_VALUE member constants for Double and Float companion objects.
JVM: Make MIN_VALUE and MAX_VALUE not an extension but member constant properties of Double and Float companion objects.
2015-05-26 00:26:19 +03:00
Ilya Gorbunov f18b9caa8d JS: Provide MIN_VALUE and MAX_VALUE member constants for Int, Long, Short and Byte companion objects.
JVM: Make MIN_VALUE and MAX_VALUE not an extension but member constant properties of Int, Long, Short and Byte companion objects.
2015-05-17 17:26:25 +03:00
Ilya Gorbunov 592e6582b3 Provide isInfinite() and isFinite() functions for Double and Float.
#KT-7126 Fixed
2015-04-22 18:21:31 +03:00