Skip to content

Test: introduce index_gt_test GTest suite#725

Open
yoonseok-kim wants to merge 1 commit intounum-cloud:main-devfrom
yoonseok-kim:index_gt_test
Open

Test: introduce index_gt_test GTest suite#725
yoonseok-kim wants to merge 1 commit intounum-cloud:main-devfrom
yoonseok-kim:index_gt_test

Conversation

@yoonseok-kim
Copy link
Contributor

I thought it would be useful to have dedicated unit tests for index_gt, so I added them. I would appreciate your review. :)

Key Changes

  • Add index_gt_test.cpp, a GTest-based unit test suite for the low-level index_gt engine
  • Wire up the new target via USEARCH_BUILD_TEST_CPP_GT CMake option (GoogleTest v1.17.0 via FetchContent)
  • Document build and run instructions in cpp/README.md

Test Coverage

  • Parameterized add/search correctness across multiple configs (size, dims, connectivity, ef)
  • Search result distance ordering (non-decreasing)
  • member_iterator_gt and candidates_iterator_t postfix ++/-- STL semantics
  • Prefetch invocation during add and search, including cache-populated metric pattern
  • Predicate filtering (even keys, reject-all, exclude-self, combined with prefetch)
  • Copy/move semantics, edge cases (1D vectors, minimum connectivity), and stress test (2048 vectors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant