Svyatoslav Kuzmich
0de1242f68
[JS IR BE] Unmute passed tests
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
b239c80531
[JS IR BE] Add a few kotlin.test stubs to IR runtime
2019-01-29 19:06:31 +03:00
Svyatoslav Kuzmich
75328f26ea
[JS IR BE] Add missing KJS_WITH_FULL_RUNTIME to some tests
...
+ ranges test generator
2019-01-27 01:14:51 +03:00
Svyatoslav Kuzmich
aa811dcfb3
[JS IR BE] Add KJS_WITH_FULL_RUNTIME directive to compiler tests
2019-01-24 16:14:40 +03:00
Mikhael Bogdanov
d1efac617d
Get rid of reduntant jvm parts in tests
2018-12-21 16:09:12 +01:00
Mikhael Bogdanov
f59b6a350f
Specify JVM target backend for other java related tests
2018-12-21 16:09:11 +01:00
Svyatoslav Kuzmich
4c38d55f21
[JS IR BE] Unmute tests
2018-10-15 00:03:45 +03:00
Anton Bannykh
8c6337f3f6
[JS IR BE]: support dynamic_var["foo"] = "bar"
...
Used EQ origin to detect. Added a test to check dynamic_var = "bar" case
is not affected
2018-10-10 13:43:22 +03:00
Georgy Bronnikov
ade640eadb
JVM_IR. Support compile time constants
2018-10-01 12:25:55 +03:00
Georgy Bronnikov
487f500f85
Revert "JVM_IR. Support compile time constants"
...
This reverts commit 055215c54f .
2018-09-25 05:24:48 +03:00
Georgy Bronnikov
055215c54f
JVM_IR. Support compile time constants
2018-09-25 01:38:51 +03:00
Svyatoslav Kuzmich
b79dcbe8e6
[JS IR BE] Refactor equals and compareTo lowering
2018-09-24 18:21:57 +03:00
Anton Bannykh
beaf6df8c5
[JS IR BE] support CharSequence and String methods
2018-09-21 18:16:03 +03:00
Anton Bannykh
7d5a304cf6
[JS IR BE] support Char.rangeTo()
2018-09-18 15:43:55 +03:00
Anton Bannykh
2e709a81fa
[JS IR BE] Arrays, varargs
2018-09-18 14:36:20 +03:00
Svyatoslav Kuzmich
ad58fdd158
[JS IR BE] Unmute tests after adding stdlib
2018-09-04 20:19:04 +03:00
Mikhael Bogdanov
06b16a6459
Unmute ir-tests after prev commit
2018-08-09 14:22:46 +03:00
Zalim Bashorov
a6cd552a71
[JS IR BE] Implement Long.rangeTo and unmute tests
2018-07-25 14:51:08 +03:00
Svyatoslav Kuzmich
1abb4f42ac
[JS IR BE] Add ranges to runtime, rangeTo for primitive numbers
2018-07-17 20:18:29 +03:00
Mikhael Bogdanov
e149cbe852
Mute failed jvm ir tests
2018-06-28 12:26:41 +02:00
Anton Bannykh
96355e2732
JS IR: mute codegen box tests automatically
2018-06-09 19:15:38 +03:00
Dmitry Petrov
d38258d7a0
Use specified comparison generator for chars in optimized ranges
...
Otherwise if Char value is a result of some erased generic call,
coercing it to I (primitive int) causes CCE at run-time.
#KT-23104 Fixed Target versions 1.2.40
2018-03-13 09:34:10 +03:00
Anton Bannykh
ed80252ba8
JS: fix double compareTo behaviour for NaN and +-0 (KT-22723)
2018-02-28 15:01:58 +03:00
Dmitry Petrov
4193fae9fa
Fix floating point comparison generation for range literals
2017-11-16 10:54:25 +03:00
Dmitry Petrov
f23dfdc0ac
Mark operands of POP2 as don't touch in unused expression elimination
...
Fixes KT-20879.
2017-10-24 15:38:15 +03:00
Dmitry Petrov
21cdf9dd5b
Add cast to expected type in call-based in-expression generation
...
#KT-20106 Fixed
2017-09-05 15:32:53 +03:00
Dmitry Petrov
6a673a03e4
Generate test data for in-expression tests, fix bug with indices
2017-07-12 15:56:29 +03:00
Dmitry Petrov
0ce6bac7eb
Generate proper 'compareTo' calls for non-primitive 'a in x .. y'
...
When we have some custom implementation of Comparable, it's important
that we compare values exactly as 'lowBound <= a && a <= highBound'.
Make sure that evaluation order and compareTo calls match for
optimized and non-optimized case.
2017-07-10 10:51:26 +03:00
Dmitry Petrov
dd5bb78178
Minor: don't use StringBuilder#setLength(0) - absent in JS
2017-07-10 10:51:26 +03:00
Dmitry Petrov
0962aec456
Minor: don't use java.lang.Integer in common test
2017-07-10 10:51:26 +03:00
Dmitry Petrov
905a16e1df
Maintain proper evaluation order for 'a in x .. y'
...
As of Kotlin 1.0 and 1.1, expression 'a in x .. y' is considered
equivalent to 'x.rangeTo(y).a', and should be evaluated in the following
order:
1. x
2. y
3. a
4. compare x with a
5. compare y with a (if needed)
2017-07-10 10:51:26 +03:00
Dmitry Petrov
64f880ba71
Add test for in/!in in a custom object range
2017-07-10 10:51:26 +03:00
Dmitry Petrov
9d1901fc7c
Intrinsify some mismatching range/element combinations for in/in!
...
It's safe to upcast integer types to Long,
floating-point types to Double.
So we don't have to create a range instance for cases such as
fun testLongInInt(x: Long, a: Int, b: Int) =
x in a .. b
which is equivalent to
fun testLongInInt(x: Long, a: Int, b: Int) =
x in a.toLong() .. b.toLong()
2017-07-10 10:51:26 +03:00
Dmitry Petrov
4480a9bdfb
Introduce BoundedValue as a generalization of (low..high) range
...
Provide BoundedValue-based implementation of InExpressionGenerator,
test it on range of comparable values.
Drop unneeded test (range of comparables is already tested by
ranges/contains/inComparableRanges.kt).
2017-07-10 10:51:26 +03:00
Dmitry Petrov
6551fdc695
Add test for nullable primitive in range
2017-07-10 10:51:26 +03:00
Dmitry Petrov
36cbc0defd
Ensure that {Collection, CharSequence}.indices intrinsic works with 'in'
2017-07-10 10:51:26 +03:00
Dmitry Petrov
ec99fa2142
Ensure that 'in/!in x until y' intrinsic works
2017-07-10 10:51:26 +03:00
Dmitry Petrov
5decf65d6a
Ensure that no range instance is created for 'x in array.indices'
2017-07-10 10:51:26 +03:00
Dmitry Petrov
7175361c97
Ensure that BranchedValue for in/!in work well with boolean operations
2017-07-10 10:51:26 +03:00
Dmitry Petrov
a3cd4f415a
Add test for comparison used for primitives and Comparable
...
There's a subtle difference in behavior between comparing
primitive Float/Double (comparison follows IEEE standard)
and boxed Float/Double (comparison is a total order).
Make sure this corner case is preserved.
2017-07-10 10:51:26 +03:00
Dmitry Petrov
fd402cb76c
Provide intrinsic for in/in! expression with range of Comparable
2017-07-10 10:51:26 +03:00
Dmitry Petrov
a7071ae7af
Provide intrinsic generators for in/!in expression
...
TODO some tests should fail because range of comparables
(e.g., '"Alpha" .. "Omega"') is currently not implemented
2017-07-10 10:51:26 +03:00
Ilya Matveev
a5e4e0284e
Mute some box tests for native backend
...
This patch mutes the following test categories:
* Tests with java dependencies (System class,
java stdlib, jvm-oriented annotations etc).
* Coroutines tests.
* Reflection tests.
* Tests with an inheritance from the standard
collections.
2017-03-10 19:59:37 +03:00
Ilya Gorbunov
10f8e70322
Rename ClosedComparableRange to ClosedFloatingPointRange
2016-12-19 18:36:52 +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
d91f3cba0b
Add additional invariant to check in Range.contains optimization tests.
...
Change expectations for double and float ranges according to #KT-4481
#KT-5044 #KT-4481
Custom 'rangeTo' might be unoptimized, but still 'in' should not diverge from 'contains'.
2016-12-08 20:47:25 +03:00
Zalim Bashorov
596f3364c6
Automatically mute failed tests
2016-11-09 21:41:12 +03:00
Vsevolod
e788ef408f
KT-5044 code cleanup, test added
2016-10-13 10:11:32 +03:00
Vsevolod
d7ad27ac3b
KT-5044 implement missing Range#contains tests and move it to separate package
2016-10-13 10:11:32 +03:00