From f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 13:11:49 +0900 Subject: test(tests): expand stub macros into plain test functions The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test functions but obscured the individual test bodies. Expanding them inline removes the macro indirection so future ports can fill in each function directly. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tests/dependency_resolver/solver_test.rs | 331 +++++++++++++++++---- 1 file changed, 280 insertions(+), 51 deletions(-) (limited to 'crates/shirabe/tests/dependency_resolver/solver_test.rs') diff --git a/crates/shirabe/tests/dependency_resolver/solver_test.rs b/crates/shirabe/tests/dependency_resolver/solver_test.rs index 8d41086..b876c99 100644 --- a/crates/shirabe/tests/dependency_resolver/solver_test.rs +++ b/crates/shirabe/tests/dependency_resolver/solver_test.rs @@ -44,54 +44,283 @@ fn set_up() -> Fixtures { // These run the dependency Solver over packages/requests built from version constraints, // whose parsing goes through a look-around regex the regex crate cannot compile; the setup // also mirrors the larger solver fixtures. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] - fn $name() { - let _fixtures = set_up(); - todo!() - } - }; -} - -stub!(test_solver_install_single); -stub!(test_solver_remove_if_not_requested); -stub!(test_install_non_existing_package_fails); -stub!(test_solver_install_same_package_from_different_repositories); -stub!(test_solver_install_with_deps); -stub!(test_solver_install_honours_not_equal_operator); -stub!(test_solver_install_with_deps_in_order); -stub!(test_solver_multi_package_name_version_resolution_depends_on_require_order); -stub!(test_solver_multi_package_name_version_resolution_is_independent_of_require_order_if_ordered_descending_by_requirement); -stub!(test_solver_fix_locked); -stub!(test_solver_fix_locked_with_alternative); -stub!(test_solver_update_does_only_update); -stub!(test_solver_update_single); -stub!(test_solver_update_all); -stub!(test_solver_update_current); -stub!(test_solver_update_only_updates_selected_package); -stub!(test_solver_update_constrained); -stub!(test_solver_update_fully_constrained); -stub!(test_solver_update_fully_constrained_prunes_installed_packages); -stub!(test_solver_all_jobs); -stub!(test_solver_three_alternative_require_and_conflict); -stub!(test_solver_obsolete); -stub!(test_install_one_of_two_alternatives); -stub!(test_install_provider); -stub!(test_skip_replacer_of_existing_package); -stub!(test_no_install_replacer_of_missing_package); -stub!(test_skip_replaced_package_if_replacer_is_selected); -stub!(test_pick_older_if_newer_conflicts); -stub!(test_install_circular_require); -stub!(test_install_alternative_with_circular_require); -stub!(test_use_replacer_if_necessary); -stub!(test_issue265); -stub!(test_conflict_result_empty); -stub!(test_unsatisfiable_requires); -stub!(test_require_mismatch_exception); -stub!(test_learn_literals_with_sorted_rule_literals); -stub!(test_install_recursive_alias_dependencies); -stub!(test_install_dev_alias); -stub!(test_install_root_aliases_if_alias_of_is_installed); -stub!(test_learn_positive_literal); +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_single() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_remove_if_not_requested() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_non_existing_package_fails() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_same_package_from_different_repositories() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_with_deps() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_honours_not_equal_operator() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_with_deps_in_order() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_multi_package_name_version_resolution_depends_on_require_order() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_multi_package_name_version_resolution_is_independent_of_require_order_if_ordered_descending_by_requirement() + { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_fix_locked() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_fix_locked_with_alternative() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_does_only_update() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_single() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_all() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_current() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_only_updates_selected_package() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_constrained() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_fully_constrained() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_fully_constrained_prunes_installed_packages() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_all_jobs() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_three_alternative_require_and_conflict() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_obsolete() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_one_of_two_alternatives() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_provider() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_skip_replacer_of_existing_package() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_no_install_replacer_of_missing_package() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_skip_replaced_package_if_replacer_is_selected() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_pick_older_if_newer_conflicts() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_circular_require() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_alternative_with_circular_require() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_use_replacer_if_necessary() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_issue265() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_conflict_result_empty() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_unsatisfiable_requires() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_require_mismatch_exception() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_learn_literals_with_sorted_rule_literals() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_recursive_alias_dependencies() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_dev_alias() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_root_aliases_if_alias_of_is_installed() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_learn_positive_literal() { + let _fixtures = set_up(); + todo!() +} -- cgit v1.3.1