MCPcopy Create free account
hub / github.com/JanSmrcka/differ / TestRenderDiff_Basic

Function TestRenderDiff_Basic

internal/ui/diff_test.go:403–415  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

401}
402
403func TestRenderDiff_Basic(t *testing.T) {
404 t.Parallel()
405 parsed := ParsedDiff{Lines: []DiffLine{
406 {Type: LineHunkHeader, Content: "func main()", OldNum: -1, NewNum: -1},
407 {Type: LineContext, Content: "ctx", OldNum: 1, NewNum: 1},
408 {Type: LineAdded, Content: "new", OldNum: -1, NewNum: 2},
409 }}
410 styles, th := testStyles()
411 result := RenderDiff(parsed, "test.go", styles, th, 100)
412 if result == "" {
413 t.Error("expected non-empty render")
414 }
415}
416
417func TestRenderDiff_Binary(t *testing.T) {
418 t.Parallel()

Callers

nothing calls this directly

Calls 2

testStylesFunction · 0.85
RenderDiffFunction · 0.85

Tested by

no test coverage detected