1
0
mirror of https://github.com/bspeice/qadapt synced 2024-11-14 18:18:08 -05:00
qadapt/tests/initial.rs

18 lines
335 B
Rust

extern crate qadapt;
use qadapt::QADAPT;
#[global_allocator]
static A: QADAPT = QADAPT::INIT;
#[test]
fn init() {
assert!(!A.has_allocated_current());
A.reset_allocation_state();
A.enable_recording_current();
assert!(!A.has_allocated_current());
let _x = Box::new(42);
assert!(A.has_allocated_current());
}