1
0
mirror of https://github.com/bspeice/qadapt synced 2024-11-14 18:18:08 -05:00
qadapt/tests/macros.rs
Bradlee Speice a7df1639ce Fix some deadlock issues
Slower, but much safer internal allocation guard
2018-11-10 20:54:35 -05:00

27 lines
344 B
Rust

extern crate qadapt;
use qadapt::allocate_panic;
#[allocate_panic]
fn allocates() {
let _v: Vec<()> = Vec::with_capacity(1);
}
#[allocate_panic]
fn no_allocate() {
let _v: Vec<()> = Vec::with_capacity(0);
}
#[test]
fn test_no_allocate() {
no_allocate();
}
/*
#[test]
#[should_panic]
fn test_allocates() {
allocates();
}
*/