5
3
Fork
You've already forked bmputil
2

Tests for matching DeviceInfo #51

Open
P-Storm wants to merge 2 commits from P-Storm/feat/probe-match-test into main
pull from: P-Storm/feat/probe-match-test
merge into: blackmagic-debug:main
blackmagic-debug:main
blackmagic-debug:add-coc-no-ai
P-Storm commented 2025年07月17日 00:02:53 +02:00 (Migrated from github.com)
Copy link

The testing of probe logic I have isolated, and now is in a unit test. It tests if the search filter has 'serial number', 'index' and 'port' matching.

I have implemented this in a Static Dispatch way, because DeviceInfo is not mockable.

A small debate is if MatchInformation should return the result of a match -> bool, or a property to match on. I think the property one is for now the best option, but open for oppinions

The testing of probe logic I have isolated, and now is in a unit test. It tests if the search filter has 'serial number', 'index' and 'port' matching. I have implemented this in a Static Dispatch way, because `DeviceInfo` is not mockable. A small debate is if `MatchInformation` should return the result of a match `-> bool`, or a property to match on. I think the property one is for now the best option, but open for oppinions
semanticdiff-com[bot] commented 2025年07月17日 00:02:55 +02:00 (Migrated from github.com)
Copy link

Review changes with SemanticDiff

Changed Files
File Status
src/bmp_matcher.rs 7% smaller
src/usb.rs 0% smaller
Review changes with &nbsp;<a href="https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes"><picture><source media="(prefers-color-scheme: dark)" srcset="https://app.semanticdiff.com/images/github_button.svg?theme=dark&smaller=7"><source media="(prefers-color-scheme: light)" srcset="https://app.semanticdiff.com/images/github_button.svg?theme=light&smaller=7"><img src="https://app.semanticdiff.com/images/github_button.svg?theme=light&smaller=7" align="center" alt="SemanticDiff"></picture></a> <details> <summary>Changed Files</summary> <br/> | File | Status | | :--- | :--- | | [<img src="https://app.semanticdiff.com/static/file-icons/rust.svg" width="20" height="20" align="center">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes#src/bmp_matcher.rs)&nbsp;&nbsp;[src/bmp\_matcher\.rs](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes#src/bmp_matcher.rs) | [<img src="https://app.semanticdiff.com/images/progressbar.svg?progress=7">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes#src/bmp_matcher.rs) &nbsp;7% smaller | | [<img src="https://app.semanticdiff.com/static/file-icons/rust.svg" width="20" height="20" align="center">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes#src/usb.rs)&nbsp;&nbsp;[src/usb\.rs](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes#src/usb.rs) | [<img src="https://app.semanticdiff.com/images/progressbar.svg?progress=0">](https://app.semanticdiff.com/gh/blackmagic-debug/bmputil/pull/51/changes#src/usb.rs) &nbsp;0% smaller | </details>
This pull request has changes conflicting with the target branch.
  • src/bmp_matcher.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin P-Storm/feat/probe-match-test:P-Storm/feat/probe-match-test
git switch P-Storm/feat/probe-match-test
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blackmagic-debug/bmputil!51
Reference in a new issue
blackmagic-debug/bmputil
No description provided.
Delete branch "P-Storm/feat/probe-match-test"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?