JS/Inlining: add test case for KT-10931

This commit is contained in:
Alexey Andreev
2016-05-13 15:07:03 +03:00
parent 5fdf7cbac9
commit b8b6999afc
3 changed files with 19 additions and 0 deletions
@@ -89,6 +89,12 @@ public class InlineMultiModuleTestGenerated extends AbstractInlineMultiModuleTes
doTest(fileName);
}
@TestMetadata("parameterWithDefaultValue")
public void testParameterWithDefaultValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/parameterWithDefaultValue/");
doTest(fileName);
}
@TestMetadata("simple")
public void testSimple() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/simple/");
@@ -0,0 +1,3 @@
package foo
inline fun bar(x: Int = 0) = x + 10
@@ -0,0 +1,10 @@
package foo
// CHECK_NOT_CALLED: bar
fun box(): String {
assertEquals(10, bar())
assertEquals(11, bar(1))
return "OK"
}