pub fn test(self) {
            assert!(!self.transactions.is_empty());
            assert!(!self.target_factories.is_empty());
            for tap in self.derived_transactions() {
                let mut succeeded_at_least_once = false;
                for target_factory in self.target_factories.iter() {
                    let before = target_factory();
                    let mut target = target_factory();
                    if let Ok(check) = tap.transaction.check(&target) {
                        let _: Tr::Output = tap
                            .transaction
                            .commit(&mut target, check)
                            .expect("Transaction failed to commit");
                        succeeded_at_least_once = true;

                        if let Err(e) = (tap.predicate)(&before, &target) {
                            panic!(
                                "Predicate failed: {}\nTransaction: {:#?}\nTarget before: {:#?} Target after: {:#?}",
                                e, tap.transaction, before, target
                            );
                        }
                    } // else ignore the inapplicable transaction
                }
                assert!(
                    succeeded_at_least_once,
                    "Transaction did not pass check() on any provided target: {:?}",
                    &tap.transaction
                );
            }
        }
/// Executes the tests and panics on failure.
Executes the tests and panics on failure.
Executes the tests and panics on failure .
pub fn test(self) {
            assert!(!self.transactions.is_empty());
            assert!(!self.target_factories.is_empty());
            for tap in self.derived_transactions() {
                let mut succeeded_at_least_once = false;
                for target_factory in self.target_factories.iter() {
                    let before = target_factory();
                    let mut target = target_factory();
                    if let Ok(check) = tap.transaction.check(&target) {
                        let _: Tr::Output = tap
                            .transaction
                            .commit(&mut target, check)
                            .expect("Transaction failed to commit");
                        succeeded_at_least_once = true;
                        if let Err(e) = (tap.predicate)(&before, &target) {
                            panic!(
                                "Predicate failed: {}\nTransaction: {:#?}\nTarget before: {:#?} Target after: {:#?}",
                                e, tap.transaction, before, target
                            );
                        }
                    } // else ignore the inapplicable transaction
                }
                assert!(
                    succeeded_at_least_once,
                    "Transaction did not pass check() on any provided target: {:?}",
                    &tap.transaction
                );
            }
        }
pub fn test ( self ) { assert ! ( self transactions is_empty ( ) ) ; assert ! ( self target_factories is_empty ( ) ) ; for tap in self . derived_transactions ( ) { let mut succeeded_at_least_once = false ; for target_factory in self . target_factories . iter ( ) { let before = target_factory ( ) ; let mut target = target_factory ( ) ; if let Ok ( check ) = tap . transaction . check ( & target ) { let _ : Tr :: Output = tap . transaction . commit ( & mut target , check ) . expect ( " " ) ; succeeded_at_least_once = true ; if let Err ( e ) = ( tap . predicate ) ( & before , & target ) { panic ! ( " \n \n " e tap transaction before target ) ; } } // else ignore the inapplicable transaction } assert ! ( succeeded_at_least_once " " tap transaction ) ; } }
Executes the tests and panics on failure.
Executes the tests and panics on failure .
self