Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor test checkFunc condition #2599

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/test/data/vector/gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestFloat32VectorGenerator(t *testing.T) {
}
if got != nil {
vectors := got(a.n, a.dim)
if len(vectors) != w.n && len(vectors[0]) != w.dim {
if !(len(vectors) == w.n && len(vectors[0]) == w.dim) {
vankichi marked this conversation as resolved.
Show resolved Hide resolved
return errors.Errorf("got: \"%d\",\"%d\"\n\t\t\t\twant: \"%d\",\"%d\"", len(vectors), len(vectors[0]), w.n, w.dim)
}
}
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestUint8VectorGenerator(t *testing.T) {
}
if got != nil {
vectors := got(a.n, a.dim)
if len(vectors) != w.n && len(vectors[0]) != w.dim {
if !(len(vectors) == w.n && len(vectors[0]) == w.dim) {
vankichi marked this conversation as resolved.
Show resolved Hide resolved
return errors.Errorf("got: \"%d\",\"%d\"\n\t\t\t\twant: \"%d\",\"%d\"", len(vectors), len(vectors[0]), w.n, w.dim)
}
}
Expand Down
Loading