Ilya Chernikov
1d72681e4e
K2: Fix stdlib test use of assertEquals
...
fixes test compilation according to the workaround
described in #KT-56717
2023-03-08 09:38:48 +00:00
Ilya Gorbunov
1addc23b23
Add range iteration tests for rangeUntil
...
#KT-52932
2022-07-26 23:52:10 +00:00
Ilya Gorbunov
721508f6dd
Add several equality tests for empty open ranges
2022-07-26 18:42:30 +00:00
Ilya Gorbunov
f422845b9c
Test open FP ranges with NaN bound
...
#KT-52932
2022-07-01 13:11:42 +00:00
Ilya Gorbunov
73084e5a68
Add tests for endExclusive property
...
Now, after a bootstrap, it's possible to use it
#KT-52932
2022-07-01 13:11:42 +00:00
Ilya Gorbunov
227953a267
Temporarily avoid endExclusive in tests
...
(until bootstrap)
2022-06-28 00:08:07 +00:00
Ilya Gorbunov
4475b15037
Add tests for open ranges
...
#KT-52932
2022-06-28 00:08:06 +00:00
Abduqodiri Qurbonzoda
42c9a27b8a
Specialize Progression first/last/OrNull functions #KT-42178
2022-04-04 22:27:49 +00:00
Ilya Gorbunov
1960fe65b8
Minor: more reliable empty range check in RangeIterationTest
2021-09-23 21:06:35 +03:00
Abduqodiri Qurbonzoda
d9ab96126d
Advance deprecation level of mixed Int/FP overloads of ClosedRange.contains to HIDDEN KT-22423
2021-04-07 00:23:34 +03:00
Ilya Gorbunov
ca6ce151a2
Unify test package names in kotlin-stdlib tests
...
This makes 'test.' an implicit package prefix, thus fixing the inspection
"Package directive doesn't match file location" positive in almost all
test files.
2021-02-25 09:58:14 +03:00
pyos
adcbfc7b4c
IR: add an emptiness check to all unsigned until loops
...
Unlike signed integers, a larger unsigned type does not mean a lower
minimum value, so `x - 1` can overflow even if `x` is casted to a larger
type.
#KT-42186 Fixed
2020-10-07 12:53:00 +02:00
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
Alexander Udalov
55c8b35eee
Remove unneeded default imports in stdlib and tests
2018-10-01 13:39:02 +02: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
3d2eb36486
Generate until, downTo, step, reversed functions for unsigned ranges/progressions
2018-08-30 14:58:20 +03:00
Ilya Gorbunov
1b1713a849
Simplify long constants in range iteration tests
2018-08-30 14:56:19 +03:00
Ilya Gorbunov
1dbaaf7f8a
Begin test coverage for unsigned ranges and progressions
2018-08-30 14:56:15 +03:00
Ilya Gorbunov
f010231ff7
Change range iteration tests so they are runnable on all platforms
...
Remove JS and Native backend exclusions
2018-08-30 14:56:13 +03:00
Ilya Gorbunov
b68c27178d
Do not use MIN_VALUE step in tests
...
#KT-17176
2018-08-30 14:56:06 +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
be8cb94105
Add failing tests for overflow in empty progressions KT-24204
2018-07-09 22:08:01 +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
9b38e5e7b5
stdlib tests: move JVM-only test source files
2018-04-12 17:53:00 +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
87c055cc61
Fix progression iterators to respect the Iterator contract.
...
#KT-16923 Fixed
2017-03-20 20:13:54 +03:00
Ilya Gorbunov
844c68286a
Refactor: replace Math.min with minOf in common code.
...
Add temporary import of kotlin.comparisons where required.
2017-01-11 14:42:36 +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
8ec2a2e6fe
Add NaN-propagation in coerceIn(ClosedComparableRange<Double>)
2016-12-08 22:13:00 +03:00
Ilya Gorbunov
ea77673dde
Reimplement coerceIn to range with new range functions: lessThanOrEquals.
2016-12-08 20:50:26 +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
1c7196a1fb
Allow to reference internal API in stdlib tests
2016-10-26 17:47:15 +03:00
Ilya Gorbunov
badbcd08de
Annotate explicitly stdlib tests, which must be excluded from JS stdlib tests with @JvmVersion, do not use file naming convention, use preprocessor instead.
2016-10-26 17:47:15 +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