TEST: convertion unit tests into run tests

This commit is contained in:
Vasily Levchenko
2016-12-27 13:02:00 +03:00
committed by vvlevchenko
parent 7fd4b4fe34
commit 3fe59cc46c
56 changed files with 188 additions and 411 deletions
+11 -1
View File
@@ -5,4 +5,14 @@ fun sumIL(a:Int, b:Long ) = a + b
fun sumIF(a:Int, b:Float ) = a + b
fun sumID(a:Int, b:Double) = a + b
fun modID(a:Int, b:Double) = a % b
fun modID(a:Int, b:Double) = a % b
fun main(args:Array<String>) {
if (sumIB(2, 3) != 5) throw Error()
if (sumIS(2, 3) != 5) throw Error()
if (sumII(2, 3) != 5) throw Error()
if (sumIL(2, 3L) != 5L) throw Error()
if (sumIF(2, 3.0f) != 5.0f) throw Error()
if (sumID(2, 3.0) != 5.0) throw Error()
if (modID(5, 3.0) != 2.0) throw Error()
}