Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
SandboxDiff.h File Reference

Structural diff engine for .rnr recordings. Compares two decoded command streams (and their headers) using a longest-common-subsequence alignment, producing a unified-diff-style report suitable for regression triage. More...

#include <cstdint>
#include <string>
#include <vector>
#include "donner/editor/sandbox/FrameInspector.h"
#include "donner/editor/sandbox/RnrFile.h"
Include dependency graph for SandboxDiff.h:

Classes

struct  donner::editor::sandbox::DiffResult
 Result of comparing two .rnr recordings. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

DiffResult donner::editor::sandbox::ComputeRnrDiff (const RnrHeader &headerA, const std::vector< DecodedCommand > &cmdsA, const RnrHeader &headerB, const std::vector< DecodedCommand > &cmdsB)
 Compares two decoded .rnr recordings and produces a unified-diff-style report. Header fields are compared first, then the command streams are aligned with a plain O(N*M) longest-common-subsequence and emitted with +/-/ prefixes (indented by each command's depth).

Detailed Description

Structural diff engine for .rnr recordings. Compares two decoded command streams (and their headers) using a longest-common-subsequence alignment, producing a unified-diff-style report suitable for regression triage.

Function Documentation

◆ ComputeRnrDiff()

DiffResult donner::editor::sandbox::ComputeRnrDiff ( const RnrHeader & headerA,
const std::vector< DecodedCommand > & cmdsA,
const RnrHeader & headerB,
const std::vector< DecodedCommand > & cmdsB )

Compares two decoded .rnr recordings and produces a unified-diff-style report. Header fields are compared first, then the command streams are aligned with a plain O(N*M) longest-common-subsequence and emitted with +/-/ prefixes (indented by each command's depth).

Parameters
headerAHeader from the first recording.
cmdsADecoded commands from the first recording.
headerBHeader from the second recording.
cmdsBDecoded commands from the second recording.