Refactoring: Move blackbox tests about unsigned types to new directory

This commit is contained in:
Mikhail Zarechenskiy
2018-06-04 00:02:38 +03:00
parent b30b00eedb
commit cc19e4cd73
7 changed files with 112 additions and 60 deletions
@@ -1,16 +0,0 @@
// !LANGUAGE: +InlineClasses
// !SKIP_METADATA_VERSION_CHECK
// WITH_UNSIGNED
fun box(): String {
val u1 = 1u
val u2 = 2u
val u3 = u1 + u2
if (u3.toInt() != 3) return "fail"
val max = 0u.dec().toLong()
val expected = Int.MAX_VALUE * 2L + 1
if (max != expected) return "fail"
return "OK"
}
@@ -1,10 +0,0 @@
// !LANGUAGE: +InlineClasses
// !SKIP_METADATA_VERSION_CHECK
// WITH_UNSIGNED
fun box(): String {
val u1: UByte = 255u
if (u1.toByte().toInt() != -1) return "fail"
return "OK"
}