pub fn run(&mut self) {
        self.validate();
        if self.use_cmdline_args {
            let args: Vec<String> = env::args().collect();
            let matches = Options::new()
                .optflag("h", "help", "")
                .optflag("", "ignored", "Run only ignored tests")
                .optflag(
                    "",
                    "nocapture",
                    "Pass command stderr/stdout through to the terminal",
                )
                .optopt(
                    "",
                    "test-threads",
                    "Number of threads used for running tests in parallel",
                    "n_threads",
                )
                .parse(&args[1..])
                .unwrap_or_else(|_| usage());
            if matches.opt_present("h") {
                usage();
            }
            if matches.opt_present("ignored") {
                Arc::get_mut(&mut self.inner).unwrap().ignored = true;
            }
            if matches.opt_present("nocapture") {
                Arc::get_mut(&mut self.inner).unwrap().nocapture = true;
            }
            if let Some(s) = matches.opt_str("test-threads") {
                let test_threads = s.parse::<usize>().unwrap_or_else(|_| usage());
                if test_threads == 0 {
                    fatal("Must specify more than 0 threads.");
                }
                Arc::get_mut(&mut self.inner).unwrap().test_threads = test_threads;
            }
            if !matches.free.is_empty() {
                self.cmdline_filters = Some(matches.free);
            }
        }
        let (test_files, num_filtered) = self.test_files();
        eprint!("\nrunning {} tests", test_files.len());
        let test_files_len = test_files.len();
        let (failures, num_ignored) = test_file(test_files, Arc::clone(&self.inner));

        self.pp_failures(&failures, test_files_len, num_ignored, num_filtered);

        if !failures.is_empty() {
            process::exit(1);
        }
    }
/// Run all the lang tests.
Run all the lang tests.
Run all the lang tests .
pub fn run(&mut self) {
        self.validate();
        if self.use_cmdline_args {
            let args: Vec<String> = env::args().collect();
            let matches = Options::new()
                .optflag("h", "help", "")
                .optflag("", "ignored", "Run only ignored tests")
                .optflag(
                    "",
                    "nocapture",
                    "Pass command stderr/stdout through to the terminal",
                )
                .optopt(
                    "",
                    "test-threads",
                    "Number of threads used for running tests in parallel",
                    "n_threads",
                )
                .parse(&args[1..])
                .unwrap_or_else(|_| usage());
            if matches.opt_present("h") {
                usage();
            }
            if matches.opt_present("ignored") {
                Arc::get_mut(&mut self.inner).unwrap().ignored = true;
            }
            if matches.opt_present("nocapture") {
                Arc::get_mut(&mut self.inner).unwrap().nocapture = true;
            }
            if let Some(s) = matches.opt_str("test-threads") {
                let test_threads = s.parse::<usize>().unwrap_or_else(|_| usage());
                if test_threads == 0 {
                    fatal("Must specify more than 0 threads.");
                }
                Arc::get_mut(&mut self.inner).unwrap().test_threads = test_threads;
            }
            if !matches.free.is_empty() {
                self.cmdline_filters = Some(matches.free);
            }
        }
        let (test_files, num_filtered) = self.test_files();
        eprint!("\nrunning {} tests", test_files.len());
        let test_files_len = test_files.len();
        let (failures, num_ignored) = test_file(test_files, Arc::clone(&self.inner));
        self.pp_failures(&failures, test_files_len, num_ignored, num_filtered);
        if !failures.is_empty() {
            process::exit(1);
        }
    }
pub fn run ( & mut self ) { self . validate ( ) ; if self . use_cmdline_args { let args : Vec < String > = env :: args ( ) . collect ( ) ; let matches = Options :: new ( ) . optflag ( " " , " " , " " ) . optflag ( " " , " " , " " ) . optflag ( " " , " " , " " , ) . optopt ( " " , " " , " " , " " , ) . parse ( & args [ 1 .. ] ) . unwrap_or_else ( | _ | usage ( ) ) ; if matches . opt_present ( " " ) { usage ( ) ; } if matches . opt_present ( " " ) { Arc :: get_mut ( & mut self . inner ) . unwrap ( ) . ignored = true ; } if matches . opt_present ( " " ) { Arc :: get_mut ( & mut self . inner ) . unwrap ( ) . nocapture = true ; } if let Some ( s ) = matches . opt_str ( " " ) { let test_threads = s . parse :: < usize > ( ) . unwrap_or_else ( | _ | usage ( ) ) ; if test_threads == 0 { fatal ( " " ) ; } Arc :: get_mut ( & mut self . inner ) . unwrap ( ) . test_threads = test_threads ; } if ! matches . free . is_empty ( ) { self . cmdline_filters = Some ( matches . free ) ; } } let ( test_files , num_filtered ) = self . test_files ( ) ; eprint ! ( " \n " test_files len ( ) ) ; let test_files_len = test_files . len ( ) ; let ( failures , num_ignored ) = test_file ( test_files , Arc :: clone ( & self . inner ) ) ; self . pp_failures ( & failures , test_files_len , num_ignored , num_filtered ) ; if ! failures . is_empty ( ) { process :: exit ( 1 ) ; } }
Run all the lang tests.
Run all the lang tests .
&mut self
&mut self