Skip to content

add some tests for insert_overwrite/from_iter_unique behavior#304

Merged
sunshowers merged 3 commits into
mainfrom
sunshowers/spr/add-some-tests-for-insert_overwritefrom_iter_unique-behavior
Jul 19, 2026
Merged

add some tests for insert_overwrite/from_iter_unique behavior#304
sunshowers merged 3 commits into
mainfrom
sunshowers/spr/add-some-tests-for-insert_overwritefrom_iter_unique-behavior

Conversation

@sunshowers

Copy link
Copy Markdown
Collaborator

Preparation for #303.

  • Add a standard test for from_iter_unique.
  • Add FlipItem tests.

Created using spr 1.3.6-beta.1

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds integration tests that pin down IdOrdMap::from_iter_unique duplicate reporting and exercise fail-fast behavior when an item’s key changes mid-operation (notably around insert_overwrite / from_iter_unique), as preparation for the refactor discussed in #303.

Changes:

  • Add IdOrdMap::from_iter_unique tests for duplicate-key error reporting and empty iterators.
  • Introduce FlipItem pathological tests covering insert_overwrite panics and from_iter_unique behavior under key-flip scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/iddqd/tests/integration/pathological.rs Adds FlipItem and new pathological tests validating fail-fast panics and post-panic map validity for flip-key scenarios.
crates/iddqd/tests/integration/id_ord_map.rs Adds standard integration tests for from_iter_unique duplicate errors and empty-iterator behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/iddqd/tests/integration/pathological.rs
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@sunshowers
sunshowers merged commit 37fb3b9 into main Jul 19, 2026
35 checks passed
@sunshowers
sunshowers deleted the sunshowers/spr/add-some-tests-for-insert_overwritefrom_iter_unique-behavior branch July 19, 2026 22:32
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