Ivan Kylchik
c7435ba760
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
...
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Sergej Jaskiewicz
55ae6d1f3e
[JS IR] Optimize pattern-matching of enums into comparing their ordinals
...
For this code:
```
enum class Season {
WINTER,
SPRING,
SUMMER,
AUTUMN
}
fun bar1(x : Season) : String {
return when (x) {
Season.WINTER, Season.SPRING -> "winter_spring"
Season.SUMMER -> "summer"
else -> "autumn"
}
}
```
previously we generated this:
```
function foo(x) {
var tmp0_subject = x;
return (tmp0_subject.equals(Season_WINTER_getInstance())
? true
: tmp0_subject.equals(Season_SPRING_getInstance()))
? 'winter_spring'
: tmp0_subject.equals(Season_SUMMER_getInstance())
? 'summer'
: 'autumn';
}
```
And now we generated this:
```
function bar2(x) {
var tmp0_subject = x;
var tmp0 = tmp0_subject._get_ordinal__0_k$();
var tmp;
switch (tmp0) {
case 0:
case 1:
tmp = 'winter_spring';
break;
case 2:
tmp = 'summer';
break;
case 3:
tmp = 'autumn';
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
}
```
2021-10-14 11:44:01 +00:00
Sergej Jaskiewicz
65d40c2253
[JS IR] Make tests that use directives pass with IR BE
2021-10-06 09:23:50 +00:00
Mikhail Glukhikh
a4c7619c89
[FIR2IR] Introduce & use FirBuiltInsPackageFragment
...
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.
2020-03-24 10:37:53 +03:00
Mark Punzalan
9df2f69f09
[FIR] Disable failing blackbox codegen tests for FIR.
2019-11-19 11:00:09 +03:00
Roman Artemev
6c8e30eb05
Fix test failures
...
* add metadata
* unmute working tests
* mute temporary broken ones
2018-08-09 20:55:50 +03:00
Anton Bannykh
96355e2732
JS IR: mute codegen box tests automatically
2018-06-09 19:15:38 +03:00
Alexey Andreev
89db4dfe79
JS: translate when against enum to JsSwitch when possible
2017-11-17 11:07:41 +03:00
Alexey Andreev
b5358122e2
JS: unmute shared box tests
2016-11-16 19:50:10 +03:00
Zalim Bashorov
596f3364c6
Automatically mute failed tests
2016-11-09 21:41:12 +03:00
Alexander Udalov
06a67e6602
Merge boxWithStdlib testData into box, delete BoxWithStdlib test
2016-03-09 10:25:38 +03:00