Deterministic visual-semantic SVG comparison with typed reports for programs and text-only agents.
Dependencies
moon add Milky2018/svgdiff@0.7.1///|
test "compare SVG source strings through the public package" {
let before = "<svg width='16' height='16'><rect width='8' height='8' fill='red'/></svg>"
let after = "<svg width='16' height='16'><rect width='8' height='8' fill='blue'/></svg>"
let report = @svgdiff.compare(
before,
after,
@svgdiff.ComparisonProfile::v1_default(),
)
assert_eq(report.schema_version, "2.0")
assert_eq(report.analysis_status, "complete")
assert_true(report.atomic_differences.length() > 0)
assert_true(report.events.length() > 0)
}fn compare(before_svg : String, after_svg : String, profile : ComparisonProfile) -> StructuredReportfn compare_with_control(before_svg : String, after_svg : String, profile : ComparisonProfile, control : ComparisonControl) -> StructuredReport raise ComparisonInterruptedfn compare_with_control_and_resources(before_svg : String, after_svg : String, profile : ComparisonProfile, before_resources : ResourceBundle, after_resources : ResourceBundle, control : ComparisonControl) -> StructuredReport raise ComparisonInterruptedfn compare_with_resources(before_svg : String, after_svg : String, profile : ComparisonProfile, before_resources : ResourceBundle, after_resources : ResourceBundle) -> StructuredReportDeterministic visual-semantic SVG comparison with typed reports for programs and text-only agents.
Dependencies