TEST: convertion unit tests into run tests
This commit is contained in:
committed by
vvlevchenko
parent
7fd4b4fe34
commit
3fe59cc46c
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user