pub fn multi<A>(tests: &[&Fn(&mut Engine, &mut Core) -> Result<A>]) {
    LOGGER.call_once(|| env_logger::init().unwrap());
    let db_num = DB_NUM.fetch_add(1, SeqCst);
    let db_addr = get_db_addr(db_num);
    for test in tests {
        let mut core = Core::new().unwrap();
        let db = PgDB::new(&db_addr).unwrap();
        let mut holmes = Engine::new(db, core.handle());
        test(&mut holmes, &mut core).unwrap();
    }
    PgDB::destroy(&db_addr).unwrap();
}
/// Call a sequence of functions on the database, simulating a program
/// termination in between each by constructing a fresh `Engine`.
/// Data is _destroyed_ unless an error occurs.
Call a sequence of functions on the database, simulating a program
termination in between each by constructing a fresh `Engine`.
Data is _destroyed_ unless an error occurs.
Call a sequence of functions on the database simulating a program termination in between each by constructing a fresh ` Engine ` . Data is _destroyed_ unless an error occurs .
pub fn multi<A>(tests: &[&Fn(&mut Engine, &mut Core) -> Result<A>]) {
    LOGGER.call_once(|| env_logger::init().unwrap());
    let db_num = DB_NUM.fetch_add(1, SeqCst);
    let db_addr = get_db_addr(db_num);
    for test in tests {
        let mut core = Core::new().unwrap();
        let db = PgDB::new(&db_addr).unwrap();
        let mut holmes = Engine::new(db, core.handle());
        test(&mut holmes, &mut core).unwrap();
    }
    PgDB::destroy(&db_addr).unwrap();
}
pub fn multi < A > ( tests : & [ & Fn ( & mut Engine , & mut Core ) -> Result < A > ] ) { LOGGER . call_once ( | | env_logger :: init ( ) . unwrap ( ) ) ; let db_num = DB_NUM . fetch_add ( 1 , SeqCst ) ; let db_addr = get_db_addr ( db_num ) ; for test in tests { let mut core = Core :: new ( ) . unwrap ( ) ; let db = PgDB :: new ( & db_addr ) . unwrap ( ) ; let mut holmes = Engine :: new ( db , core . handle ( ) ) ; test ( & mut holmes , & mut core ) . unwrap ( ) ; } PgDB :: destroy ( & db_addr ) . unwrap ( ) ; }
Call a sequence of functions on the database, simulating a program
termination in between each by constructing a fresh `Engine`.
Call a sequence of functions on the database simulating a program termination in between each by constructing a fresh ` Engine ` .
tests
&[&Fn(&mut Engine, &mut Core) -> Result<A>]
tests
&[&Fn(&mut Engine, &mut Core) -> Result<A>]