((package, test): &'a (&'a Package, Option<&'a Test>))
| 938 | }; |
| 939 | |
| 940 | fn handle_tests<'a>((package, test): &'a (&'a Package, Option<&'a Test>)) -> TestType { |
| 941 | if let Some(test) = test { |
| 942 | let test_cases = test |
| 943 | .get_testcases(package) |
| 944 | .expect("Fail to parse integration test"); |
| 945 | TestType::IntegrationTest(IntegrationTest { |
| 946 | package_name: &package.name, |
| 947 | test, |
| 948 | test_cases, |
| 949 | }) |
| 950 | } else { |
| 951 | let test_cases = package |
| 952 | .get_unit_test_names() |
| 953 | .expect("Fail to parse unit test"); |
| 954 | TestType::UnitTest(UnitTest { |
| 955 | package_name: &package.name, |
| 956 | test_cases, |
| 957 | }) |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | #[derive(Debug)] |
| 962 | enum TestType<'a> { |
nothing calls this directly
no test coverage detected