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

Example how to update state #10716

Closed
wants to merge 2 commits into from
Closed

Conversation

stepancheg
Copy link
Contributor

I'm adding AppMock again. This is not very nice looking code.

I'm thinking about this alternative: create a crate like bevy_mocks, which could be added as dev-dependency to most crates. AFAIU dev-dependencies are available in doctests.

bevy_mocks would contain interfaces of most frequently utilities like App or Input<KeyCode> and dummy implementations. That would be sufficient to write compile-only tests which would look concise in sources and illustrative in published rustdocs.

@ItsDoot ItsDoot added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events labels Nov 24, 2023
@alice-i-cecile
Copy link
Member

I'm thinking about this alternative: create a crate like bevy_mocks, which could be added as dev-dependency to most crates. AFAIU dev-dependencies are available in doctests.

This is a neat idea. Can you spin out an issue for it?

@stepancheg
Copy link
Contributor Author

#10726

Copy link
Member

@TrialDragon TrialDragon left a comment

Choose a reason for hiding this comment

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

LGTM and the AppMock works as a solution for now until #3786 is resolved and hopefully removes the need. (Tho, this does have conflicts that needs to be resolved before merging).

@TrialDragon TrialDragon added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 5, 2024
@alice-i-cecile
Copy link
Member

@stepancheg can you please resolve merge conflicts?

@TrialDragon
Copy link
Member

This seems to not be importing necessary stuff; doc tests are failing.

@alice-i-cecile alice-i-cecile added the S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! label Mar 12, 2024
@moonlightaria moonlightaria mentioned this pull request May 10, 2024
@alice-i-cecile
Copy link
Member

Closing as adopted.

auto-merge was automatically disabled May 13, 2024 13:02

Pull request was closed

github-merge-queue bot pushed a commit that referenced this pull request May 13, 2024
# Objective
adopted from #10716
adds example for updating state

---------

Co-authored-by: Stepan Koltsov <[email protected]>
Co-authored-by: Alice Cecile <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants