rocketraman commented on a change in pull request #14:
URL:
https://github.com/apache/logging-log4j-kotlin/pull/14#discussion_r546721176
##########
File path:
log4j-api-kotlin/src/test/kotlin/org.apache.logging.log4j.kotlin/LoggerTest.kt
##########
@@ -173,7 +173,8 @@ class LoggerTest {
fun `Run in trace with result`() {
var count = 0
val f = withLevelFixture(Level.INFO, true) {
- it.runInTrace(entryMsg) {
+ @SuppressWarnings("unused")
+ val mustBeHere = it.runInTrace(entryMsg) {
Review comment:
Hmm, you're right -- seems like a subtle change in behavior due to the
new type inference.
We might as well assert on the returned count:
```
var returnedCount = 0
val f = withLevelFixture(Level.INFO, true) {
returnedCount = it.runInTrace(entryMsg) {
++count
}
}
assertTrue { count == 1 }
assertTrue { returnedCount == 1 }
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]