mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 11:07:04 +05:30
fix(api): simplify test assertion
This commit is contained in:
parent
96728a3834
commit
5dabebf579
1 changed files with 1 additions and 2 deletions
|
@ -20,9 +20,8 @@ object TestUtils {
|
||||||
return String(file.readBytes())
|
return String(file.readBytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <reified T> assertIs(value: Any?): T {
|
inline fun <reified T> assertIs(value: Any?) {
|
||||||
contract { returns() implies (value is T) }
|
contract { returns() implies (value is T) }
|
||||||
assertThat(value).isInstanceOf(T::class.java)
|
assertThat(value).isInstanceOf(T::class.java)
|
||||||
return value as T
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue