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

Fix bugs in TimeIntervalCollection. #6418

Merged
merged 1 commit into from
Apr 3, 2018
Merged

Conversation

shunter
Copy link
Contributor

@shunter shunter commented Apr 3, 2018

  • Undid extraction of local variable for intervals[index] in removeInterval which was not done correctly.
  • Several places compared JulianDates incorrectly using TimeInterval.equals.

I also made the structure of the code match our original C# source as closely as
possible, given the language differences. Both of the above errors were a
result of the code diverging, in an attempt to clean it up.

I also added another unit test ported from our original source, and kept
the new unit tests added in #6398 (after fixing them to be correct).

@cesium-concierge
Copy link

Signed CLA is on file.

@shunter, thanks for the pull request! Maintainers, we have a signed CLA from @shunter, so you can review this at any time.

⚠️ I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and comment on this pull request so we know it was updated. For more info, see the Pull Request Guidelines.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@shunter
Copy link
Contributor Author

shunter commented Apr 3, 2018

Replaces #6398. As mentioned above, I kept the new unit tests from that PR.

* Undid extraction of local variable for intervals[index] in `removeInterval` which was not done correctly.
* Several places compared JulianDates incorrectly using TimeInterval.equals.

I also made the structure of the code match our original C# source as closely as
possible, given the language differences.  Both of the above errors were a
result of the code diverging, in an attempt to clean it up.

I also added another unit test ported from our original source, and kept
the new unit tests added in #6398 (after fixing them to be correct).
@shunter shunter force-pushed the fixTimeIntervalCollection branch from 99aaf21 to 6473f2e Compare April 3, 2018 15:16
@hpinkos
Copy link
Contributor

hpinkos commented Apr 3, 2018

Looks great, thanks @shunter!

@hpinkos hpinkos merged commit d4ee00f into master Apr 3, 2018
@hpinkos hpinkos deleted the fixTimeIntervalCollection branch April 3, 2018 16:35
@DanielLeone
Copy link
Contributor

Nice one :) mmm all those extra unit tests :D
Cheers @shunter and the rest

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.

4 participants