diff options
Diffstat (limited to 'crates/shirabe/tests/dependency_resolver')
| -rw-r--r-- | crates/shirabe/tests/dependency_resolver/default_policy_test.rs | 160 | ||||
| -rw-r--r-- | crates/shirabe/tests/dependency_resolver/solver_test.rs | 327 |
2 files changed, 411 insertions, 76 deletions
diff --git a/crates/shirabe/tests/dependency_resolver/default_policy_test.rs b/crates/shirabe/tests/dependency_resolver/default_policy_test.rs index 979261e..077dd71 100644 --- a/crates/shirabe/tests/dependency_resolver/default_policy_test.rs +++ b/crates/shirabe/tests/dependency_resolver/default_policy_test.rs @@ -51,32 +51,138 @@ impl Drop for TearDown { // These build a Pool from packages and exercise DefaultPolicy::selectPreferredPackages. // Constructing the packages/constraints parses versions through a look-around regex the // regex crate cannot compile, and the setup mirrors the solver fixtures. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] - fn $name() { - let _tear_down = TearDown; - let _fixtures = set_up(); - todo!() - } - }; +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_single() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() } -stub!(test_select_single); -stub!(test_select_newest); -stub!(test_select_newest_picks_latest); -stub!(test_select_newest_picks_latest_stable_with_prefer_stable); -stub!(test_select_lowest_with_prefer_dev_over_prerelease); -stub!(test_select_lowest_prefers_prerelease_over_dev); -stub!(test_select_lowest_with_prefer_stable_still_prefers_stable); -stub!(test_select_newest_with_dev_picks_non_dev); -stub!(test_select_newest_with_preferred_version_picks_preferred_version_if_available); -stub!(test_select_newest_with_preferred_version_picks_newest_otherwise); -stub!(test_select_newest_with_preferred_version_picks_lowest_if_prefer_lowest); -stub!(test_repository_ordering_affects_priority); -stub!(test_select_local_repos_first); -stub!(test_select_all_providers); -stub!(test_prefer_non_replacing_from_same_repo); -stub!(test_prefer_replacing_package_from_same_vendor); -stub!(test_select_lowest); +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_picks_latest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_picks_latest_stable_with_prefer_stable() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest_with_prefer_dev_over_prerelease() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest_prefers_prerelease_over_dev() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest_with_prefer_stable_still_prefers_stable() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_dev_picks_non_dev() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_preferred_version_picks_preferred_version_if_available() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_preferred_version_picks_newest_otherwise() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_preferred_version_picks_lowest_if_prefer_lowest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_repository_ordering_affects_priority() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_local_repos_first() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_all_providers() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_prefer_non_replacing_from_same_repo() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_prefer_replacing_package_from_same_vendor() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} 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!() - } - }; +#[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!() } -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_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!() +} |
