Skip to content

Commit

Permalink
Merge branch 'release/v1.7' into backport/release/v1.7/fix/ngt/index
Browse files Browse the repository at this point in the history
  • Loading branch information
vankichi authored Sep 11, 2024
2 parents adc4bf2 + 1f24c38 commit c3a7181
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions internal/test/data/vector/gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ func TestFloat32VectorGenerator(t *testing.T) {
}
if got != nil {
vectors := got(a.n, a.dim)
if len(vectors) != w.n && len(vectors[0]) != w.dim {
return errors.Errorf("got: \"%d\",\"%d\"\n\t\t\t\twant: \"%d\",\"%d\"", len(vectors), len(vectors[0]), w.n, w.dim)
if len(vectors) != w.n {
return errors.Errorf("got: \"%#v\",\n\t\t\t\twantLen: \"%#v\"", len(vectors), w.n)
}
for _, vec := range vectors {
if len(vec) != w.dim {
return errors.Errorf("got: \"%#v\",\n\t\t\t\twantDim: \"%#v\"", len(vec), w.dim)
}
}
}
return nil
Expand Down Expand Up @@ -140,8 +145,13 @@ func TestUint8VectorGenerator(t *testing.T) {
}
if got != nil {
vectors := got(a.n, a.dim)
if len(vectors) != w.n && len(vectors[0]) != w.dim {
return errors.Errorf("got: \"%d\",\"%d\"\n\t\t\t\twant: \"%d\",\"%d\"", len(vectors), len(vectors[0]), w.n, w.dim)
if len(vectors) != w.n {
return errors.Errorf("got: \"%#v\",\n\t\t\t\twantLen: \"%#v\"", len(vectors), w.n)
}
for _, vec := range vectors {
if len(vec) != w.dim {
return errors.Errorf("got: \"%#v\",\n\t\t\t\twantDim: \"%#v\"", len(vec), w.dim)
}
}
}
return nil
Expand Down

0 comments on commit c3a7181

Please sign in to comment.