Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tmf: Bug 581427: handle BIG_BANG/BIG_CRUNCH in TmfTimestamp#getDelta
TmfTimestamp.BIG_CRUNCH.getDelta(TmfTimestamp.BIG_BANG) leads to an invalid result due to an overflow. Time deltas involving any of those two special values are defined as: BIG_BANG - BIG_BANG == ZERO BIG_CRUNCH - BIG_CRUNCH == ZERO BIG_BANG - <anything other than BIG_BANG> == BIG_BANG BIG_CRUNCH - <anything other than BIG_CRUNCH> == BIG_CRUNCH <anything other than BIG_BANG> - BIG_BANG == BIG_CRUNCH <anything other than BIG_CRUNCH> - BIG_CRUNCH == BIG_BANG Also, add tests to cover this. Bug 581427 Change-Id: Ibb71126af0fee338c74791ed0e4ac8bd5cb87de6 Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com> Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/199616 Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Tested-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
- Loading branch information
1 parent
7290218
commit f1dd159
Showing
4 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters