all: upgrade golangci-lint and formatters (#240)

This commit is contained in:
Michael McLoughlin
2022-03-27 15:31:26 -07:00
committed by GitHub
parent 553930530f
commit 72b8db9c80
24 changed files with 179 additions and 118 deletions

View File

@@ -257,14 +257,17 @@ func ComputeCFG(t *testing.T, f *ir.Function) error {
}
func AssertSuccessors(t *testing.T, f *ir.Function, expect map[string][]string) {
t.Helper()
AssertEqual(t, "successors", OpcodeSuccessorGraph(f), expect)
}
func AssertPredecessors(t *testing.T, f *ir.Function, expect map[string][]string) {
t.Helper()
AssertEqual(t, "predecessors", OpcodePredecessorGraph(f), expect)
}
func AssertEqual(t *testing.T, what string, got, expect interface{}) {
t.Helper()
t.Logf("%s=%#v\n", what, got)
if reflect.DeepEqual(expect, got) {
return