[Test] Add nullability annotations on InTextDirectivesUtils methods
This commit is contained in:
committed by
TeamCityServer
parent
49f2ac3545
commit
9378d1ff31
+2
-2
@@ -40,11 +40,11 @@ interface TestParameters {
|
||||
}
|
||||
|
||||
private fun KParameter.parseValue(text: String): Any? = when (type.classifier as? KClass<*>) {
|
||||
Boolean::class -> InTextDirectivesUtils.getPrefixedBoolean(text, name) ?: false
|
||||
Boolean::class -> name?.let { InTextDirectivesUtils.getPrefixedBoolean(text, it) } ?: false
|
||||
else -> error("Invalid test parameter $name with type $type")
|
||||
}
|
||||
|
||||
private val <T : Any> KClass<T>.primaryConstructorOrError
|
||||
get() = primaryConstructor ?: error("Primary constructor should present")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user