Commit Graph

23 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda d3fb9cc5f3 Deprecate with error mixed Int/FP contains operator for ranges KT-22423 2020-06-29 12:18:19 +03:00
Abduqodiri Qurbonzoda 3cad1bbb51 Create method Collection.randomOrNull() #KT-35347 2020-01-16 22:25:53 +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 bf83f0e070 Implement contains extension functions for URanges (KT-26378) 2019-03-08 23:34:35 +03:00
Ilya Gorbunov 6786b9ece2 Stdlib tests: cleanup warnings 2018-09-14 15:32:08 +03:00
Ilya Gorbunov 1eda3805ec Introduce overloads to check for T? element contained in iterable range in a constant time
#KT-18483
2018-09-11 17:06:42 +03:00
Ilya Gorbunov 48add96e79 Deprecate mixed Int/FP contains operator for ranges
#KT-22423
2018-09-11 05:40:15 +03:00
Ilya Gorbunov 009980944b Refine the exception type of EmptyRange.random()
Make it the same type as in case of an empty collection, so that
`emptyRange.random()` throws the same exception as `emptyRange.toList().random()`.

#KT-15539
2018-08-30 16:21:36 +03:00
Ilya Gorbunov 7dc6c3d7ce Prohibit MIN_VALUE step for unsigned progressions 2018-08-30 14:56:04 +03:00
Pap Lőrinc bdf623f711 Prohibit step size of min value, as it doesn't have a negated counterpart
#KT-17176
2018-08-30 14:56:00 +03:00
Ilya Gorbunov 5f3a7f0147 Use Char.MIN_VALUE and MAX_VALUE in tests 2018-08-30 14:55:45 +03:00
Ilya Gorbunov ecf0d7ec0d Reformat stdlib tests and samples
#KT-5558
2018-04-27 05:28:57 +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 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +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 d60fc7d9a8 Introduce ClosedComparableRange interface which inherits ClosedRange to provide special comparison operation for double and float. 2016-12-08 20:50:11 +03:00
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 6a70761783 Minor: normalize '@Test' annotation casing in all tests. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 9c4221cda8 Return EMPTY range [0, -1] when MIN_VALUE is specified as exclusive upper bound.
#KT-12762 Fixed
2016-08-26 05:19:51 +03:00
Ilya Gorbunov c5a208f3eb Rearrange stdlib unit tests across packages.
Rearrange JS stdlib unit tests.
2016-06-18 16:50:32 +03:00