This is a shared public utility. Its main utility is for methods
that can fail, have an error message of their own, and also want
to take an error message from a caller and want to combine them.
Example useĀ :
fun <T> assertEquals(expected: T, actual: T, msg: String? = null) {
if (expected != null) {
failWithErrorReason(msg, "Expected $expected, got $actual")
}
}
...which allows someone to say
assertEquals(a, b, "Checking a vs b")
Test: TH
Flag: EXEMPT test-only change
Change-Id: Id3eaa8384b4177f38f13576d9b4d742c52027ae4