Skip to content

Commit

Permalink
Merge branch 'main' into feature/api/update-timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
kpango authored Sep 10, 2024
2 parents 03a27e2 + f418cc9 commit 54cece1
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 54cece1

Please sign in to comment.