diff options
author | aSemy <897017+aSemy@users.noreply.github.com> | 2022-10-13 15:45:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 16:45:39 +0300 |
commit | dc9983a608cac6215d2a3ebb8e41e8f710cab126 (patch) | |
tree | 327eba8a34eeae839c89fa10f84ae8c7490803b6 /formats/json-tests | |
parent | cb6bcbb6484513e38bdbb0e87aced462ac8f04fa (diff) | |
download | kotlinx.serialization-dc9983a608cac6215d2a3ebb8e41e8f710cab126.tar.gz |
Update test assertions to use IntelliJ "Click to see difference" format (#2062)
This makes test failures easier to see, because when the test fails IntelliJ will generate a 'click to see difference' link that opens the IntelliJ comparison editor, with the two strings provided.
https://stackoverflow.com/q/10934743/4161471
Diffstat (limited to 'formats/json-tests')
-rw-r--r-- | formats/json-tests/commonTest/src/kotlinx/serialization/test/TestingFramework.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/formats/json-tests/commonTest/src/kotlinx/serialization/test/TestingFramework.kt b/formats/json-tests/commonTest/src/kotlinx/serialization/test/TestingFramework.kt index c31e4919..b46afe69 100644 --- a/formats/json-tests/commonTest/src/kotlinx/serialization/test/TestingFramework.kt +++ b/formats/json-tests/commonTest/src/kotlinx/serialization/test/TestingFramework.kt @@ -78,7 +78,7 @@ inline fun assertFailsWithSerialMessage( ) assertTrue( exception.message!!.contains(message), - "Expected message '${exception.message}' to contain substring '$message'" + "expected:<${exception.message}> but was:<$message>" ) } inline fun <reified T : Throwable> assertFailsWithMessage( @@ -89,6 +89,6 @@ inline fun <reified T : Throwable> assertFailsWithMessage( val exception = assertFailsWith(T::class, assertionMessage, block) assertTrue( exception.message!!.contains(message), - "Expected message '${exception.message}' to contain substring '$message'" + "expected:<${exception.message}> but was:<$message>" ) } |