@@ -1196,19 +1196,6 @@ mod tests {
1196
1196
assert_eq ! ( a_load, LoadState :: Loaded ) ;
1197
1197
assert_eq ! ( a_deps, DependencyLoadState :: Loading ) ;
1198
1198
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
- // ));
1212
1199
Some ( ( ) )
1213
1200
} ) ;
1214
1201
@@ -1226,46 +1213,32 @@ mod tests {
1226
1213
let ( a_load, a_deps, a_rec_deps) = asset_server. get_load_states ( a_id) . unwrap ( ) ;
1227
1214
assert_eq ! ( a_load, LoadState :: Loaded ) ;
1228
1215
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
+ ) ) ;
1230
1220
Some ( ( ) )
1231
1221
} ) ;
1232
1222
1233
1223
gate_opener. open ( c_path) ;
1234
1224
run_app_until ( & mut app, |world| {
1235
1225
let a_text = get :: < CoolText > ( world, a_id) ?;
1236
1226
let c_id = a_text. dependencies [ 1 ] . id ( ) ;
1227
+ // wait until c loads
1237
1228
let _c_text = get :: < CoolText > ( world, c_id) ?;
1238
1229
1239
1230
let ( a_load, a_deps, a_rec_deps) = asset_server. get_load_states ( a_id) . unwrap ( ) ;
1240
1231
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
+ ) ;
1243
1240
Some ( ( ) )
1244
1241
} ) ;
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
- // });
1269
1242
}
1270
1243
1271
1244
const SIMPLE_TEXT : & str = r#"
0 commit comments