Skip to content

Commit

Permalink
fix ut typo (zilliztech#707)
Browse files Browse the repository at this point in the history
Signed-off-by: Buqian Zheng <[email protected]>
  • Loading branch information
zhengbuqian authored and [email protected] committed Jul 23, 2024
1 parent 5989cc2 commit 88cf101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ut/test_sparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,11 @@ TEST_CASE("Test Mem Sparse Index Handle Empty Vector", "[float metrics]") {

SECTION("Test GetVectorByIds") {
std::vector<int64_t> ids = {0, 1, 2};
auto results = idx.GetVectorByIds(GenIdsDataSet(2, ids));
auto results = idx.GetVectorByIds(GenIdsDataSet(3, ids));
REQUIRE(results.has_value());
auto xb = (knowhere::sparse::SparseRow<float>*)train_ds->GetTensor();
auto res_data = (knowhere::sparse::SparseRow<float>*)results.value()->GetTensor();
for (int i = 0; i < 2; ++i) {
for (int i = 0; i < 3; ++i) {
const auto& truth_row = xb[i];
const auto& res_row = res_data[i];
REQUIRE(truth_row.size() == res_row.size());
Expand Down

0 comments on commit 88cf101

Please sign in to comment.