mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
Add more tests
This commit is contained in:
parent
09d86603a9
commit
d0a75c1430
@ -434,3 +434,17 @@ impl<'a, T: ?Sized + 'a> DerefMut for WriteLock<'a, T> {
|
||||
self.inner.deref_mut()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use buffer::{CpuAccessibleBuffer, BufferUsage};
|
||||
|
||||
#[test]
|
||||
fn create_empty_buffer() {
|
||||
let (device, queue) = gfx_dev_and_queue!();
|
||||
|
||||
const EMPTY: [i32; 0] = [];
|
||||
|
||||
CpuAccessibleBuffer::from_data(device, BufferUsage::all(), Some(queue.family()), EMPTY.iter());
|
||||
}
|
||||
}
|
||||
|
@ -655,6 +655,13 @@ mod tests {
|
||||
.then_signal_fence_and_flush().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn create_buffer_zero_size_data() {
|
||||
let (device, queue) = gfx_dev_and_queue!();
|
||||
|
||||
ImmutableBuffer::from_data((), BufferUsage::all(), Some(queue.family()), queue.clone());
|
||||
}
|
||||
|
||||
// TODO: write tons of tests that try to exploit loopholes
|
||||
// this isn't possible yet because checks aren't correctly implemented yet
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user