Fix suppressed warnings in unit tests
This commit is contained in:
parent
09d341ae6d
commit
4206f8b905
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user