JS: create new common directory for all generated tests, migrate several tests there

This commit is contained in:
Alexey Andreev
2016-08-26 16:44:48 +03:00
parent 34a57f863b
commit 2bf0199959
321 changed files with 2123 additions and 2001 deletions
@@ -0,0 +1,25 @@
package foo
// CHECK_CONTAINS_NO_CALLS: identity
// CHECK_CONTAINS_NO_CALLS: sumNoInline
internal inline fun sum(a: Int, b: Int = 0): Int {
return a + b
}
internal fun identity(a: Int): Int {
return sum(a)
}
internal fun sumNoInline(a: Int, b: Int): Int {
return sum(a, b)
}
fun box(): String {
assertEquals(1, identity(1))
assertEquals(2, identity(2))
assertEquals(3, sumNoInline(1, 2))
assertEquals(5, sumNoInline(2, 3))
return "OK"
}