1
0
mirror of https://github.com/bspeice/qadapt synced 2024-11-14 18:18:08 -05:00
qadapt/tests/initial.rs
Bradlee Speice aafec768ca Takes us 576 allocations to get up and running
I need a better way to handle initialization costs...
2018-09-22 16:13:36 -04:00

14 lines
302 B
Rust

extern crate qadapt;
use qadapt::QADAPT;
use std::sync::atomic::Ordering;
#[global_allocator]
static A: QADAPT = QADAPT::INIT;
#[test]
fn init() {
// Make sure that we don't have any allocations at the start
// that pollute other tests
assert!(!A.has_allocated.load(Ordering::SeqCst));
}