Adapted usage of failsWith().

This commit is contained in:
Evgeny Gerashchenko
2013-01-29 20:43:36 +04:00
parent 719ed4c795
commit dd4b508213
7 changed files with 54 additions and 54 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ class ArraysTest {
// Fails in JS: expect(0.toByte()) { byteArray(3, 2, 1) reduce { a, b -> (a - b).toByte() } }
// Fails in JS: expect(0.toShort()) { shortArray(3, 2, 1) reduce { a, b -> (a - b).toShort() } }
failsWith<UnsupportedOperationException> {
failsWith(javaClass<UnsupportedOperationException>()) {
intArray().reduce { a, b -> a + b}
}
}
@@ -64,7 +64,7 @@ class ArraysTest {
// Fails in JS: expect(2.toByte()) { byteArray(1, 2, 3) reduceRight { a, b -> (a - b).toByte() } }
// Fails in JS: expect(2.toShort()) { shortArray(1, 2, 3) reduceRight { a, b -> (a - b).toShort() } }
failsWith<UnsupportedOperationException> {
failsWith(javaClass<UnsupportedOperationException>()) {
intArray().reduceRight { a, b -> a + b}
}
}