Skip to content

Add spring animation Fantom integration tests#56106

Open
sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC:export-D95058965
Open

Add spring animation Fantom integration tests#56106
sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC:export-D95058965

Conversation

@sammy-SC
Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Internal]

Add 3 Fantom integration tests for Animated.spring targeting
SpringAnimationDriver.cpp (0% → 89.4% line coverage):

  • basic spring animation: underdamped spring (stiffness=100, damping=10),
    verifies mid-animation progress, final value, and finish callback
  • overshoot clamping: highly underdamped spring (stiffness=300, damping=5)
    with overshootClamping: true, samples 25 points to assert value never
    exceeds toValue — exercises isOvershooting() and clamping branches
  • critically damped: damping=20 (zeta=1.0), verifies monotonic convergence
    without oscillation — exercises overdamped/critically damped branch in
    getValueAndVelocityForTime()

Reviewed By: cortinico

Differential Revision: D95058965

Summary:
Changelog: [Internal]

Add 3 Fantom integration tests for `Animated.spring` targeting
`SpringAnimationDriver.cpp` (0% → 89.4% line coverage):

- **basic spring animation**: underdamped spring (stiffness=100, damping=10),
  verifies mid-animation progress, final value, and finish callback
- **overshoot clamping**: highly underdamped spring (stiffness=300, damping=5)
  with `overshootClamping: true`, samples 25 points to assert value never
  exceeds toValue — exercises `isOvershooting()` and clamping branches
- **critically damped**: damping=20 (zeta=1.0), verifies monotonic convergence
  without oscillation — exercises overdamped/critically damped branch in
  `getValueAndVelocityForTime()`

Reviewed By: cortinico

Differential Revision: D95058965
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 16, 2026

@sammy-SC has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95058965.

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants