JS test: added inline tests

This commit is contained in:
Alexey Tsvetkov
2014-09-29 16:00:18 +04:00
committed by Zalim Bashorov
parent 987708680f
commit 3f2d4b31be
112 changed files with 4442 additions and 0 deletions
@@ -0,0 +1,25 @@
package foo
// CHECK_CONTAINS_NO_CALLS: doNothingInt
// CHECK_CONTAINS_NO_CALLS: doNothingStr
inline fun <T> doNothing(a: T): T {
return a
}
fun doNothingInt(a: Int): Int {
return doNothing(a)
}
fun doNothingStr(a: String): String {
return doNothing(a)
}
fun box(): String {
assertEquals(1, doNothingInt(1))
assertEquals(2, doNothingInt(2))
assertEquals("ab", doNothingStr("ab"))
assertEquals("abc", doNothingStr("abc"))
return "OK"
}