Skip to content
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

lestarch: fixing Fw::Time to allow comparisons across different time … #803

Merged
merged 2 commits into from
Jul 7, 2021

Conversation

LeStarch
Copy link
Collaborator

…bases

Originating Project/Creator Infra
Affected Component Fw::Time
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n) y
Builds Without Errors (y/n) y
Unit Tests Pass (y/n) y
Documentation Included (y/n) n/a

Change Description

Fw::Time doesn't assert when comparing across time bases, but returns INCOMPARABLE instead. This allows comparing against ZERO_TIME.

Rationale

Comparisons shouldn't crash the system. They should fail instead.

Future Work

Look into add and subtract methods. These are left for future work as it is less clear what to do in this case.

@LeStarch LeStarch requested a review from bocchino June 30, 2021 16:34
@LeStarch
Copy link
Collaborator Author

@metzdigital this should fix your issue too.

@metzdigital
Copy link
Contributor

@metzdigital this should fix your issue too.

You are my hero!

Copy link
Collaborator

@bocchino bocchino left a comment

Choose a reason for hiding this comment

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

Looks good, just one comment.

Fw/Time/test/ut/TimeTest.cpp Outdated Show resolved Hide resolved
@LeStarch
Copy link
Collaborator Author

LeStarch commented Jul 6, 2021

@bocchino could you rereview?

Copy link
Collaborator

@bocchino bocchino left a comment

Choose a reason for hiding this comment

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

Looks good!

@LeStarch LeStarch merged commit 927d2f0 into nasa:devel Jul 7, 2021
@LeStarch LeStarch deleted the fix/fw-time-assert branch September 2, 2021 22:41
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.

3 participants