-
Notifications
You must be signed in to change notification settings - Fork 247
Fix positive/nagative args in Duration CTOR
#767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your project status has failed because the head coverage (67%) is below the target coverage (80%). You can increase the head coverage or adjust the target coverage. @@ Coverage Diff @@
## main #767 +/- ##
===================================
Coverage 67% 67%
===================================
Files 104 104
Lines 4494 4499 +5
Branches 1113 1113
===================================
+ Hits 2996 3003 +7
+ Misses 1068 1066 -2
Partials 430 430
🚀 New features to boost your workflow:
|
2e01d65 to
85bb993
Compare
85bb993 to
b2bd9f6
Compare
| [TestCase("-P0DT0H30M0S", 0, 0, 0, -30, 0)] | ||
| [TestCase("-P1DT1H", 0, -1, -1, 0, 0)] | ||
| [TestCase("P", null, null, null, null, null)] // Empty duration | ||
| [TestCase("PT", null, null, null, null, null)] // Empty time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this legal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P and PT are not, I'll remove it for clarity
|
Great! Thank you for fixing this! |
* Updated the `Duration` to identify the expected sign for args correctly * Added new test cases for `DurationSerializer` to validate various duration formats and handle invalid arguments. Fixes #766
b2bd9f6 to
16aed0b
Compare
|
Duration handlingDuration CTOR



Durationstruct for improved argument validation and error messagingAlarmTest.csforDurationSerializerto validate various duration formats and handle invalid arguments.Fixes #766