Skip to content

ADD: Unit tests for MDEEStripHit - #185

Merged
fhagemann merged 3 commits into
cositools:develop/emfrom
fhagemann:test/MDEEStripHit
Aug 18, 2026
Merged

ADD: Unit tests for MDEEStripHit#185
fhagemann merged 3 commits into
cositools:develop/emfrom
fhagemann:test/MDEEStripHit

Conversation

@fhagemann

Copy link
Copy Markdown

I used my left-over GitHub Copilot AI credits from July (before they expired) to create a unit-test file for MDEEStripHit.

@fhagemann fhagemann added the test Tests and code coverage label Aug 3, 2026
@fhagemann

Copy link
Copy Markdown
Author

After merging #165, this might also need some small test on m_HasFastTiming that was introduced in #165.

@fhagemann
fhagemann marked this pull request as draft August 4, 2026 00:17
@fhagemann
fhagemann marked this pull request as ready for review August 4, 2026 19:36
@fhagemann

Copy link
Copy Markdown
Author

Tests for m_HasFastTiming are now included, and this PR is rebased on top of the current develop/em

@ckierans ckierans left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't have enough unit test experience/knowledge to provide valuable feedback, but I gave the file a skim. If it's running through and working, then go for the merge!

Comment thread unittests/UTNDEEStripHit.cxx Outdated
Passed = EvaluateFalse("MDEEStripHit()", "default trigger", "Default trigger flag is false", H.m_HasTriggered) && Passed;
Passed = EvaluateFalse("MDEEStripHit()", "default fast timing", "Default fast timing is false", H.m_HasFastTiming) && Passed;
Passed = Evaluate("MDEEStripHit()", "default TAC", "Default TAC value is 0", H.m_TAC, (unsigned int) 0) && Passed;
Passed = EvaluateNear("MDEEStripHit()", "default temperature", "Default temperature is 0", H.m_Temperature, 0.0, 1e-12) && Passed;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not necessarily a comment for this PR, but I'm now seeing that you still have the m_Temperature variable in MDEEStripHit, but we removed it from MStripHit, so you might want another PR to clean that up.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch, I pushed another commit to remove this from both MDEEStripHit and MDEECrystalHit already in this (small) PR.

@fhagemann
fhagemann requested a review from zoglauer August 17, 2026 20:12
@ckierans

Copy link
Copy Markdown
Collaborator

Looks good. You can merge when you're ready.

@fhagemann
fhagemann merged commit f4e0565 into cositools:develop/em Aug 18, 2026
1 check passed
@fhagemann
fhagemann deleted the test/MDEEStripHit branch August 18, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Tests and code coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants