(parsed: &TestCommand)
| 41 | } |
| 42 | |
| 43 | pub fn subtest(parsed: &TestCommand) -> Result<Box<dyn SubTest>> { |
| 44 | assert_eq!(parsed.command, "inline"); |
| 45 | let mut test = TestInline::default(); |
| 46 | for option in parsed.options.iter() { |
| 47 | match option { |
| 48 | TestOption::Flag("precise-output") => test.precise_output = true, |
| 49 | TestOption::Flag("optimize") => test.optimize = true, |
| 50 | _ => anyhow::bail!("unknown option on {parsed}"), |
| 51 | } |
| 52 | } |
| 53 | Ok(Box::new(test)) |
| 54 | } |
| 55 | |
| 56 | impl SubTest for TestInline { |
| 57 | fn name(&self) -> &'static str { |