chore: remove old and unused code
This commit is contained in:
@@ -106,3 +106,17 @@ func TestHighlightDiffRemovesOnlyCommonIndent(t *testing.T) {
|
||||
t.Fatalf("dedented code:\n%q\nwant:\n%q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHighlightDiffCacheReturnsIndependentSlices(t *testing.T) {
|
||||
highlightedDiffs.clear()
|
||||
|
||||
first := highlightDiff("main.go", "@@ -1 +1 @@\n-old\n+new", 1, 1, "RIGHT")
|
||||
if len(first) == 0 {
|
||||
t.Fatal("highlighted diff is empty")
|
||||
}
|
||||
first[0].code = "mutated"
|
||||
second := highlightDiff("main.go", "@@ -1 +1 @@\n-old\n+new", 1, 1, "RIGHT")
|
||||
if len(second) == 0 || second[0].code == "mutated" {
|
||||
t.Fatalf("cached highlighted diff shares caller storage: %#v", second)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user