Skip to content

Commit

Permalink
testcases: check workspace_tests_count
Browse files Browse the repository at this point in the history
  • Loading branch information
zjp-CN committed Oct 27, 2024
1 parent fb144d5 commit 0686193
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/repo/testcases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ pub fn get(repo_root: &Utf8Path, workspace_root: &Utf8Path) -> Result<PkgTests>
ele.pkg_tests_count = ele.tests.iter().map(|t| t.testcases.len()).sum();
}

let sum_pkg_tests_count: usize = map.values().map(|p| p.pkg_tests_count).sum();
ensure!(
sum_pkg_tests_count == workspace_tests_count,
"test cases count are not equal: sum_pkg_tests_count ({sum_pkg_tests_count}) \
workspace_tests_count ({workspace_tests_count})"
);

Ok(map)
}

Expand Down

0 comments on commit 0686193

Please sign in to comment.