Skip to content

Commit

Permalink
lint: Fix testifylint
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jul 13, 2024
1 parent af21686 commit ad4ef3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions db/undirected_graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ func TestUndirectedGraph_PutSymmetric(t *testing.T) {
g := NewUndirectedGraph()
g.PutSymmetric("a", "b", true)

assert.Equal(t, true, g.matrix["a"]["b"])
assert.Equal(t, true, g.matrix["b"]["a"])
assert.True(t, g.matrix["a"]["b"])
assert.True(t, g.matrix["b"]["a"])
}

func TestUndirectedGraph_GetRowColumns(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions lib/erd_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestErdGenerator_generatePlantUmlErd(t *testing.T) {
Distance: tt.fields.Distance,
}
got := g.generatePlantUmlErd(tt.args.schema)
assert.Greater(t, len(got), 0)
assert.NotEmpty(t, got)
})
}
}
Expand Down Expand Up @@ -201,7 +201,7 @@ func TestErdGenerator_generateMermaidErd(t *testing.T) {
Distance: tt.fields.Distance,
}
got := g.generateMermaidErd(tt.args.schema)
assert.Greater(t, len(got), 0)
assert.NotEmpty(t, got)
})
}
}
Expand Down Expand Up @@ -326,7 +326,7 @@ func TestErdGenerator_generate_withSkipTable(t *testing.T) {
got, err := g.generate(tt.args.schema)
if assert.NoError(t, err) {
if len(tt.wantContainTables) == 0 {
assert.Equal(t, got, "")
assert.Equal(t, "", got)
} else {
for _, tableName := range tt.wantContainTables {
assert.Contains(t, got, tableName)
Expand Down

0 comments on commit ad4ef3b

Please sign in to comment.