Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Dec 28, 2025

Summary

This PR adds additional tests following the merge of #45, focusing on external (virtual) source/target tree code paths.

New Tests (17 tests)

Test Name Purpose
split_virtual_source_operations Test virtual source handling when links reference deleted sources
split_external_source_tree_iteration Test tree iteration with handler functions
split_virtual_target_operations Test virtual target handling
split_search_all_tree_paths Test search operations across tree branches
split_count_usages_tree_branches Test count_usages tree traversal
split_tree_ordering_operations Test first_is_to_left/right_of_second comparisons
split_each_usages_core_branches Test recursive iteration with scrambled insertions
unit_virtual_source_operations Unit store virtual source tests
unit_tree_ordering_operations Unit store ordering tests
unit_each_usages_core_branches Unit store iteration tests
split_count_links_two_element_query Test 2-element query counting
split_is_virtual_detection Test is_unused/is_virtual detection
split_resolve_dangling_operations Test dangling link resolution

Context

These tests exercise internal tree operations that handle "virtual" or "external" links - cases where a link references a source or target that has been deleted. This is important for testing the split store's external source/target trees.

Follows up on #45 and issue #44.

Test Plan

  • All tests pass locally with cargo test --all-features
  • Clippy and format checks pass

🤖 Generated with Claude Code

Split tests to avoid exceeding file size limit:
- doublets/tests/store_internals.rs: Original tests (827 lines)
- doublets/tests/external_tree_tests.rs: New tests (436 lines)

New tests (17 tests in external_tree_tests.rs):
| Test Name | Purpose |
|-----------|---------|
| `split_virtual_source_operations` | Test virtual source handling |
| `split_external_source_tree_iteration` | Test tree iteration with handler |
| `split_virtual_target_operations` | Test virtual target handling |
| `split_search_all_tree_paths` | Test search across tree branches |
| `split_count_usages_tree_branches` | Test count_usages tree traversal |
| `split_tree_ordering_operations` | Test tree ordering comparisons |
| `split_each_usages_core_branches` | Test recursive iteration |
| `unit_virtual_source_operations` | Unit store virtual source tests |
| `unit_tree_ordering_operations` | Unit store ordering tests |
| `unit_each_usages_core_branches` | Unit store iteration tests |
| `split_count_links_two_element_query` | Test 2-element query counting |
| `split_is_virtual_detection` | Test is_unused detection |
| `split_resolve_dangling_operations` | Test dangling link resolution |

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard force-pushed the add-external-tree-tests branch from 4af3a0a to ff8a1f7 Compare December 28, 2025 05:11
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.

2 participants