Skip to content

Commit

Permalink
fixup! Invoke a DeviceLostClosure immediately if set on an invalid de…
Browse files Browse the repository at this point in the history
…vice.
  • Loading branch information
ErichDonGubler committed Mar 15, 2024
1 parent 6a3cf20 commit bb03319
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/tests/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,7 @@ static DEVICE_DROP_THEN_LOST: GpuTestConfiguration = GpuTestConfiguration::new()
matches!(reason, wgt::DeviceLostReason::Dropped),
"Device lost info reason should match DeviceLostReason::Dropped."
);
assert!(
message == "Device dropped.",
"Device lost info message should be \"Device dropped.\"."
);
assert_eq!(message, "Device dropped.");
});
ctx.device.set_device_lost_callback(callback);

Expand Down Expand Up @@ -657,11 +654,7 @@ static DROPPED_GLOBAL_THEN_DEVICE_LOST: GpuTestConfiguration = GpuTestConfigurat
matches!(reason, wgt::DeviceLostReason::Dropped),
"Device lost info reason should match DeviceLostReason::Dropped."
);
assert!(
message == "Device is dying.",
"Device lost info message is \"{}\" and it should be \"Device is dying.\".",
message
);
assert_eq!(message, "Device is dying.");
});
ctx.device.set_device_lost_callback(callback);

Expand Down

0 comments on commit bb03319

Please sign in to comment.