Skip to content

Commit 1fd9e35

Browse files
TODO: testing
1 parent 3cbe264 commit 1fd9e35

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/tests/wgpu-validation/noop.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,18 @@ fn device_and_buffers() {
5656
device.poll(wgpu::PollType::wait_indefinitely()).unwrap();
5757
assert!(done2.load(Relaxed));
5858
}
59+
60+
#[test]
61+
fn transfer_overflow() {
62+
let (device, queue) = wgpu::Device::noop(&wgpu::DeviceDescriptor::default());
63+
64+
// Create a small buffer. We don't care about the size of this buffer, just that we can use it.
65+
let buffer = device.create_buffer(&wgpu::BufferDescriptor {
66+
label: Some("hello world"),
67+
size: 8,
68+
usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::COPY_SRC,
69+
mapped_at_creation: false,
70+
});
71+
72+
buffer.map_async(wgpu::MapMode::Read, , callback);
73+
}

0 commit comments

Comments
 (0)