KetraTerm
API · v0.3.0All versions

compare

fun compare(expected: TerminalConformanceSnapshot, actual: TerminalConformanceSnapshot, maxDifferences: Int = DEFAULT_MAX_DIFFERENCES): TerminalConformanceDiff

Compares every observable snapshot field in deterministic order.

The result is bounded so a badly diverged grid cannot create an unmanageable assertion message. A non-positive maxDifferences is rejected rather than silently hiding all diagnostics.

Return

structured bounded diff.

Parameters

expected

specification or oracle snapshot.

actual

snapshot produced by the terminal under test.

maxDifferences

maximum mismatches retained in the result.