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

Add more unit tests #293

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Add more unit tests #293

merged 1 commit into from
Feb 9, 2025

Conversation

Spartan322
Copy link
Member

@Spartan322 Spartan322 commented Feb 4, 2025

Add Fixed Point unit tests
Add Vector unit tests
Add Colour unit tests
Add Date unit tests
Add Timespan unit tests
Add Approx to assist floating point comparisons
Separate unit test build and run options

Add double Vector (for testing)
Add Vector <=>, >, >=, <, <= operators
Add Vector cross-type operators

Add fixed_point_t::_0_25()
Add Fixed Point float comparison operators
Make fixed_point_t(int64) constructor explicit
Fix fixed_point_t Vector abs function

Add rgb and rgba integer parsing to Colour
Add Colour string parse methods
Add invert operator to Colour
Add full_invert to Colour (includes alpha)
Add _rgba Colour user-defined literal

Add Timespan prefix and postfix -- operators
Add Timespan to_chars method

Add Date prefix and postfix -- operators
Add Date to_chars method
Improve Date to_string method
Add Date from_chars method
Improve Date from_string method
Add Date from_string_log method

@Spartan322 Spartan322 added the enhancement New feature or request label Feb 4, 2025
@Spartan322 Spartan322 force-pushed the improve/tests branch 3 times, most recently from be8aaac to 390e105 Compare February 5, 2025 05:25
@Spartan322 Spartan322 changed the title Add 2D Vector unit tests Add more unit tests Feb 5, 2025
@Spartan322 Spartan322 force-pushed the improve/tests branch 12 times, most recently from a3a44b4 to b3321fb Compare February 7, 2025 02:26
@Spartan322 Spartan322 marked this pull request as ready for review February 7, 2025 02:26
@Spartan322 Spartan322 force-pushed the improve/tests branch 11 times, most recently from 9a1a1db to a7898ca Compare February 7, 2025 06:51
wvpm
wvpm previously approved these changes Feb 7, 2025
@Spartan322 Spartan322 force-pushed the improve/tests branch 2 times, most recently from d4d2120 to ac282bb Compare February 7, 2025 17:34
Hop311
Hop311 previously approved these changes Feb 9, 2025
Copy link
Contributor

@Hop311 Hop311 left a comment

Choose a reason for hiding this comment

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

Amazing work!

src/openvic-simulation/types/Date.hpp Outdated Show resolved Hide resolved
src/openvic-simulation/types/Date.hpp Show resolved Hide resolved
src/openvic-simulation/types/Date.hpp Outdated Show resolved Hide resolved
src/openvic-simulation/types/VectorN.inc Show resolved Hide resolved
src/openvic-simulation/types/VectorN.inc Show resolved Hide resolved
src/openvic-simulation/types/Colour.hpp Outdated Show resolved Hide resolved
tests/src/types/Approx.hpp Outdated Show resolved Hide resolved
tests/src/types/Approx.hpp Outdated Show resolved Hide resolved
tests/src/types/Approx.hpp Show resolved Hide resolved
tests/src/types/Vector2.cpp Outdated Show resolved Hide resolved
Add Fixed Point unit tests
Add Vector unit tests
Add Colour unit tests
Add Date unit tests
Add Timespan unit tests
Add Approx to assist floating point comparisons
Separate unit test build and run options

Add double Vector (for testing)
Add Vector <=>, >, >=, <, <= operators
Add Vector cross-type operators

Add `fixed_point_t::_0_25()`
Add Fixed Point float comparison operators
Make fixed_point_t(int64) constructor explicit
Fix fixed_point_t Vector abs function

Add rgb and rgba integer parsing to Colour
Add Colour string parse methods
Add invert operator to Colour
Add full_invert to Colour (includes alpha)
Add _rgba Colour user-defined literal

Add Timespan prefix and postfix -- operators
Add Timespan to_chars method

Add Date prefix and postfix -- operators
Add Date to_chars method
Improve Date to_string method
Add Date from_chars method
Improve Date from_string method
Add Date from_string_log method
Copy link
Contributor

@Hop311 Hop311 left a comment

Choose a reason for hiding this comment

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

Great work, congrats on being the one to resolve our longstanding lack of unit testing! 🎉🎉🎉

@Spartan322 Spartan322 merged commit 986b913 into master Feb 9, 2025
14 checks passed
@Spartan322 Spartan322 deleted the improve/tests branch February 9, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants