Skip to content

Add more reflection tests for Handle#24115

Open
greeble-dev wants to merge 4 commits intobevyengine:mainfrom
greeble-dev:more-handle-reflect-tests
Open

Add more reflection tests for Handle#24115
greeble-dev wants to merge 4 commits intobevyengine:mainfrom
greeble-dev:more-handle-reflect-tests

Conversation

@greeble-dev
Copy link
Copy Markdown
Contributor

@greeble-dev greeble-dev commented May 4, 2026

Objective

Build on #24048 to improve test coverage for Handle reflection, and also repro #24111.

Solution

Add various tests. Includes a test for valid cases of from_reflect and try_apply - this is relevant since from_reflect now has a custom implementation.

I've snuck in a few cleanups too:

  • Avoid multiple tests repeating the same imports.
  • Fix an accidentally duplicated comment.

Testing

cargo test -p bevy_asset

@greeble-dev greeble-dev added A-Assets Load files from disk to use for things like images, models, and sounds A-Reflection Runtime information about types 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 labels May 4, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Assets May 4, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Reflection May 4, 2026
Comment thread crates/bevy_asset/src/handle.rs Outdated
@alice-i-cecile alice-i-cecile requested a review from andriyDev May 4, 2026 14:48
@cart cart closed this May 5, 2026
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Reflection May 5, 2026
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Assets May 5, 2026
@cart cart reopened this May 5, 2026
@github-project-automation github-project-automation Bot moved this from Done to Needs SME Triage in Assets May 5, 2026
@github-project-automation github-project-automation Bot moved this from Done to Needs SME Triage in Reflection May 5, 2026
@alice-i-cecile
Copy link
Copy Markdown
Member

Broken by the force push noted in #24130; you'll need to clean up the Git history per @cart's message.

@greeble-dev greeble-dev force-pushed the more-handle-reflect-tests branch from 1f77971 to dd71651 Compare May 5, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Assets Load files from disk to use for things like images, models, and sounds A-Reflection Runtime information about types 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

Status: Needs SME Triage
Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

3 participants