Skip to content

Commit 28b5e84

Browse files
committed
debug build
1 parent 671c9f0 commit 28b5e84

File tree

1 file changed

+13
-40
lines changed

1 file changed

+13
-40
lines changed

crates/bevy_asset/src/lib.rs

+13-40
Original file line numberDiff line numberDiff line change
@@ -1196,19 +1196,6 @@ mod tests {
11961196
assert_eq!(a_load, LoadState::Loaded);
11971197
assert_eq!(a_deps, DependencyLoadState::Loading);
11981198
assert_eq!(a_rec_deps, RecursiveDependencyLoadState::Loading);
1199-
// assert!(matches!(asset_server.load_state(a_id), LoadState::Loading));
1200-
// let c_id = a_text.dependencies[1].id();
1201-
// let c_load = asset_server.load_state(c_id);
1202-
1203-
// if !matches!(c_load, LoadState::Failed(_)) {
1204-
// // wait until c has exited the loading state
1205-
// return None;
1206-
// }
1207-
1208-
// assert!(matches!(
1209-
// asset_server.dependency_load_state(a_id),
1210-
// DependencyLoadState::Failed(_)
1211-
// ));
12121199
Some(())
12131200
});
12141201

@@ -1226,46 +1213,32 @@ mod tests {
12261213
let (a_load, a_deps, a_rec_deps) = asset_server.get_load_states(a_id).unwrap();
12271214
assert_eq!(a_load, LoadState::Loaded);
12281215
assert!(matches!(a_deps, DependencyLoadState::Failed(_)));
1229-
assert!(matches!(a_rec_deps, RecursiveDependencyLoadState::Failed(_)));
1216+
assert!(matches!(
1217+
a_rec_deps,
1218+
RecursiveDependencyLoadState::Failed(_)
1219+
));
12301220
Some(())
12311221
});
12321222

12331223
gate_opener.open(c_path);
12341224
run_app_until(&mut app, |world| {
12351225
let a_text = get::<CoolText>(world, a_id)?;
12361226
let c_id = a_text.dependencies[1].id();
1227+
// wait until c loads
12371228
let _c_text = get::<CoolText>(world, c_id)?;
12381229

12391230
let (a_load, a_deps, a_rec_deps) = asset_server.get_load_states(a_id).unwrap();
12401231
assert_eq!(a_load, LoadState::Loaded);
1241-
assert!(matches!(a_deps, DependencyLoadState::Failed(_)), "Successful dependency load should not overwrite a previous failure");
1242-
assert!(matches!(a_rec_deps, RecursiveDependencyLoadState::Failed(_)), "Successful dependency load should not overwrite a previous failure");
1232+
assert!(
1233+
matches!(a_deps, DependencyLoadState::Failed(_)),
1234+
"Successful dependency load should not overwrite a previous failure"
1235+
);
1236+
assert!(
1237+
matches!(a_rec_deps, RecursiveDependencyLoadState::Failed(_)),
1238+
"Successful dependency load should not overwrite a previous failure"
1239+
);
12431240
Some(())
12441241
});
1245-
1246-
1247-
// allow b to succeed
1248-
// gate_opener.open(b_path);
1249-
1250-
// run_app_until(&mut app, |world| {
1251-
// let a_text = get::<CoolText>(world, a_id)?;
1252-
// let b_id = a_text.dependencies[0].id();
1253-
// let b_load = asset_server.load_state(b_id);
1254-
1255-
// if !matches!(b_load, LoadState::Loaded) {
1256-
// // wait until b has exited the loading state
1257-
// return None;
1258-
// }
1259-
1260-
// assert!(
1261-
// matches!(
1262-
// asset_server.dependency_load_state(a_id),
1263-
// DependencyLoadState::Failed(_)
1264-
// ),
1265-
// "A successful dependency load should not take precedent over a failed load"
1266-
// );
1267-
// Some(())
1268-
// });
12691242
}
12701243

12711244
const SIMPLE_TEXT: &str = r#"

0 commit comments

Comments
 (0)