ExpectFileToMatch

data class ExpectFileToMatch(file: String, expectedContent: String) : CompileTest.Expectation

Checks if the result has a generated file which matches the expectedContent

The content are not compared for pure equality.

In order to make tests more stable the sources strings are preprocessed:

  • line endings are trimmed

Constructors

ExpectFileToMatch
Link copied to clipboard
fun ExpectFileToMatch(file: String, expectedContent: String)

Functions

apply
Link copied to clipboard
open override fun apply(result: KotlinCompilation.Result): List<String>
Returns a list of error string or empty when all is well.
component1
Link copied to clipboard
operator fun component1(): String
component2
Link copied to clipboard
operator fun component2(): String
copy
Link copied to clipboard
fun copy(file: String, expectedContent: String): CompileTest.ExpectFileToMatch
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

expectedContent
Link copied to clipboard
val expectedContent: String
file
Link copied to clipboard
val file: String