assertTrue
fun List<FileDeclaration>.assertTrue(additionalMessage: String? = null, predicate: (FileDeclaration) -> Boolean)
Asserts that all files in this list satisfy predicate.
fun KontureFileScope.assertTrue(additionalMessage: String? = null, predicate: (FileDeclaration) -> Boolean)
Asserts that all files in this scope satisfy predicate.
fun KontureFunctionScope.assertTrue(additionalMessage: String? = null, predicate: (FunctionDeclarationContext) -> Boolean)
Asserts that all functions in this scope satisfy the given predicate.
Parameters
additionalMessage
Optional message prepended to the failure trace if the assertion fails.
predicate
The condition that every function in the scope must satisfy.
Throws
If any function fails the predicate.
fun KonturePropertyScope.assertTrue(additionalMessage: String? = null, predicate: (PropertyDeclarationContext) -> Boolean)
Asserts that all properties in this scope satisfy the given predicate.
Parameters
additionalMessage
Optional message prepended to the failure trace if the assertion fails.
predicate
The condition that every property in the scope must satisfy.
Throws
If any property fails the predicate.
fun List<ClassDeclaration>.assertTrue(additionalMessage: String? = null, predicate: (ClassDeclaration) -> Boolean)
Asserts that all classes in this list satisfy predicate.
fun KontureScope.assertTrue(additionalMessage: String? = null, predicate: (ClassDeclaration) -> Boolean)
Asserts that all classes in this scope satisfy predicate.