Add round-trip and leap-year coverage tests for DateTimeConverter (pre/post 1970)#135
Add round-trip and leap-year coverage tests for DateTimeConverter (pre/post 1970)#135Rutuja-Patil-Bosch wants to merge 20 commits intoeclipse-score:mainfrom
Conversation
…lse_isValidDateTimeFormat EpochToDateTime_Before1970_LeapYear_January_AdjustsDaysSum invalid_day_values invalid_month_values
removed redundnat checks
Feature: bgsw_baselib_ut
|
The created documentation from the pull request is available at: docu-html |
|
@Rutuja-Patil-Bosch please avoid bot based commits. Feel free to contact me directly. |
| TEST_F(DateTimeConverterTest, invalid_month_values) | ||
| { | ||
| RecordProperty("Description", "Verify invalid month values are rejected."); | ||
| RecordProperty("TestType", "Negative"); |
There was a problem hiding this comment.
"Negative" isn't one of the applicable values https://eclipse-score.github.io/process_description/main/process_areas/verification/guidance/verification_specification.html#test-specification
There was a problem hiding this comment.
@gierer Test type should be "requirements-based" or "Requirements-based test". Specification says its should be
requirements-based / interface-test/ coverage but in other baselib features test type is mentioned as "Requirements-based test".
There was a problem hiding this comment.
Reagrding
but in other baselib features test type is mentioned as "Requirements-based test".
Unfortunately, not all tests in baselibs repo are compliant to the specification. We're going to fix that.
There was a problem hiding this comment.
@4og : I'll update as per specification & update as "requirements-based"
| RecordProperty("Requirement", "DatetimeValidation"); | ||
| RecordProperty("Coverage", "MonthValidation"); |
There was a problem hiding this comment.
Those properties are not part of the test specification https://eclipse-score.github.io/process_description/main/process_areas/verification/guidance/verification_specification.html#test-specification
| auto datetimeConverted = score::common::epochToDateTime(epoch); | ||
| if (datetimeConverted == nullptr) | ||
| continue; | ||
| ASSERT_NE(datetimeConverted, nullptr); |
|
@Rutuja-Patil-Bosch, are you planning to continue with this PR? |
@4og : Will commit changes by Monday EOD. |
Summary
This PR extends unit test coverage for DateTimeConverter by adding round-trip validation and additional leap-year scenarios, especially around pre-1970 and post-1970 boundaries.
Changes
Motivation
The added tests ensure correctness of:
This improves confidence in DateTimeConverter for:
Notes
Test Scope
Impact