qadapt/tests/initial.rs

18 lines
335 B
Rust
Raw Normal View History

extern crate qadapt;
use qadapt::QADAPT;
#[global_allocator]
static A: QADAPT = QADAPT::INIT;
#[test]
fn init() {
2018-09-23 12:37:07 -04:00
assert!(!A.has_allocated_current());
A.reset_allocation_state();
A.enable_recording_current();
2018-09-23 12:37:07 -04:00
assert!(!A.has_allocated_current());
let _x = Box::new(42);
2018-09-23 12:37:07 -04:00
assert!(A.has_allocated_current());
}