Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,29 @@ class DefaultLogComparator<LogType> : LogComparator<LogType> {

return compareResult.toString().takeIf { it.isNotEmpty() }
}
}
}

@Suppress("unused")
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @Suppress("unused") annotation suggests this class might not be used yet. Consider removing this suppression once the class is properly integrated and used in the codebase.

Suggested change
@Suppress("unused")

Copilot uses AI. Check for mistakes.
class AnyOrderLogComparator<LogType> : LogComparator<LogType> {
override fun compare(recorded: List<LogType>, golden: List<LogType>): String? {
val goldenSet = golden.toSet()
val recordedSet = recorded.toSet()

val missing = goldenSet - recordedSet
val extra = recordedSet - goldenSet

if (missing.isEmpty() && extra.isEmpty()) {
return null
}

val result = StringBuilder()
if (missing.isNotEmpty()) {
result.appendLine("Missing entries (in golden but not in recorded): ${missing.toList()}")
}
if (extra.isNotEmpty()) {
result.appendLine("Extra entries (in recorded but not in golden): ${extra.toList()}")
}

return result.toString().trimEnd()
}
}