2018-09-22 16:13:36 -04:00
|
|
|
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-22 17:26:52 -04:00
|
|
|
|
2018-09-23 12:37:07 -04:00
|
|
|
assert!(!A.has_allocated_current());
|
2018-09-22 17:26:52 -04:00
|
|
|
|
|
|
|
let _x = Box::new(42);
|
2018-09-23 12:37:07 -04:00
|
|
|
assert!(A.has_allocated_current());
|
2018-09-22 16:13:36 -04:00
|
|
|
}
|