Skip to content

Commit

Permalink
Rename integration-tests feature to clearer expose-internals-to-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
merwaaan committed Aug 30, 2024
1 parent 557dfe5 commit 7f2f7e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
run: cargo doc --no-deps

- name: Run tests
# Enable the integration-tests feature so that tests/doctests get access to some private constructors
run: cargo test --features integration-tests
# Enable expose-internals-to-tests so that tests/doctests get access to some private constructors
run: cargo test --features expose-internals-to-tests
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ inherits = "release"
[features]
# Enable this feature so that the tests/doctests get access to some private constructors.
#
# > cargo test --features integration-tests
integration-tests = []
# > cargo test --features expose-internals-to-tests
expose-internals-to-tests = []

[[bench]]
name = "basic"
Expand Down
2 changes: 1 addition & 1 deletion src/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub struct AnimationLibrary {
}

impl AnimationLibrary {
#[cfg_attr(feature = "integration-tests", visibility::make(pub))]
#[cfg_attr(feature = "expose-internals-to-tests", visibility::make(pub))]
pub(crate) fn new() -> Self {
Self {
clips: HashMap::new(),
Expand Down
6 changes: 3 additions & 3 deletions src/systems/spritesheet_animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bevy::{
time::Time,
};

#[cfg(feature = "integration-tests")]
#[cfg(feature = "expose-internals-to-tests")]
use bevy::time::Real;

// In unit tests, we use a TimeUpdateStrategy to control how time advances.
Expand All @@ -17,9 +17,9 @@ use bevy::time::Real;
// So we use different time types in release and test builds for now.
//
// https://github.com/bevyengine/bevy/issues/11127
#[cfg(feature = "integration-tests")]
#[cfg(feature = "expose-internals-to-tests")]
pub(crate) type ActualTime = Time<Real>;
#[cfg(not(feature = "integration-tests"))]
#[cfg(not(feature = "expose-internals-to-tests"))]
pub(crate) type ActualTime = Time;

use crate::{
Expand Down

0 comments on commit 7f2f7e6

Please sign in to comment.