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 some basic tests for easing functions #16675

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scottmcm
Copy link
Contributor

@scottmcm scottmcm commented Dec 6, 2024

Objective

Context for #16676

The release notes nerd-sniped me again. I was looking at the EaseFunction::Exponential* definition and wondering why that specific definition was chosen. And looking into it I noticed that it seemed wrong and there weren't any tests, so here are those tests -- which are failing as proof.

Solution

I don't know what the best answer is here, but I think having tests is at least a good start for a discussion.

Testing

These are tests 🙂

@scottmcm
Copy link
Contributor Author

scottmcm commented Dec 6, 2024

The tests fail:

---- curve::easing::tests::ease_functions_zero_to_one stdout ----
thread 'curve::easing::tests::ease_functions_zero_to_one' panicked at crates/bevy_math/src/curve/easing.rs:490:13:
EaseFunction.ExponentialIn(0) was 0.0009765625

see the mentioned issue for discussion.

@IQuick143 IQuick143 added C-Testing A change that impacts how we test Bevy or how users test their apps A-Math Fundamental domain-agnostic mathematical operations D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Testing A change that impacts how we test Bevy or how users test their apps D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants