Fix suppressed warnings in unit tests

This commit is contained in:
Michael Bull 2020-08-26 19:11:13 +01:00
parent 09d341ae6d
commit 4206f8b905
2 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ class ResultIteratorTest {
val iterator = Err("hello").iterator()
assertFailsWith<NoSuchElementException> {
@Suppress("IMPLICIT_NOTHING_AS_TYPE_PARAMETER")
@Suppress("IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
iterator.next()
}
}

View File

@ -17,7 +17,7 @@ class UnwrapTest {
@Test
fun throwsExceptionIfErr() {
assertFailsWith<UnwrapException>("called Result.unwrap on an Err value 5000") {
@Suppress("IMPLICIT_NOTHING_AS_TYPE_PARAMETER")
@Suppress("IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
Err(5000).unwrap()
}
}
@ -39,7 +39,7 @@ class UnwrapTest {
}
assertFailsWith<UnwrapException>("the year should be 1994") {
@Suppress("IMPLICIT_NOTHING_AS_TYPE_PARAMETER")
@Suppress("IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
Err(1994).expect { message }
}
}
@ -49,7 +49,7 @@ class UnwrapTest {
@Test
fun throwsExceptionIfOk() {
assertFailsWith<UnwrapException>("called Result.unwrapError on an Ok value example") {
@Suppress("IMPLICIT_NOTHING_AS_TYPE_PARAMETER")
@Suppress("IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
Ok("example").unwrapError()
}
}
@ -71,7 +71,7 @@ class UnwrapTest {
}
assertFailsWith<UnwrapException>("the year should be 2010") {
@Suppress("IMPLICIT_NOTHING_AS_TYPE_PARAMETER")
@Suppress("IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
Ok(2010).expectError { message }
}
}