aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 05:03:13 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 05:03:13 +0900
commit84a926e814ae7df6b2bdb95c66df6b43936e3da4 (patch)
tree329d7483a0b8900bf1e01fc2b18579265aaba9f3 /crates
parentcaf99079ee45238653c2acf880156126e5bf0955 (diff)
downloadphp-shirabe-84a926e814ae7df6b2bdb95c66df6b43936e3da4.tar.gz
php-shirabe-84a926e814ae7df6b2bdb95c66df6b43936e3da4.tar.zst
php-shirabe-84a926e814ae7df6b2bdb95c66df6b43936e3da4.zip
test(dependency-resolver): port DefaultPolicy/PoolBuilder/PoolOptimizer/Solver as stubs
All ignored: they build Pools/run the Solver over packages whose constraint parsing uses a look-around regex the regex crate cannot compile, with fixture-heavy setup. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/shirabe/tests/dependency_resolver/default_policy_test.rs31
-rw-r--r--crates/shirabe/tests/dependency_resolver/main.rs4
-rw-r--r--crates/shirabe/tests/dependency_resolver/pool_builder_test.rs8
-rw-r--r--crates/shirabe/tests/dependency_resolver/pool_optimizer_test.rs8
-rw-r--r--crates/shirabe/tests/dependency_resolver/solver_test.rs54
5 files changed, 105 insertions, 0 deletions
diff --git a/crates/shirabe/tests/dependency_resolver/default_policy_test.rs b/crates/shirabe/tests/dependency_resolver/default_policy_test.rs
index 898ca01..b852c46 100644
--- a/crates/shirabe/tests/dependency_resolver/default_policy_test.rs
+++ b/crates/shirabe/tests/dependency_resolver/default_policy_test.rs
@@ -1 +1,32 @@
//! ref: composer/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php
+
+// 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() {
+ 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);
diff --git a/crates/shirabe/tests/dependency_resolver/main.rs b/crates/shirabe/tests/dependency_resolver/main.rs
index 80e587a..47f381d 100644
--- a/crates/shirabe/tests/dependency_resolver/main.rs
+++ b/crates/shirabe/tests/dependency_resolver/main.rs
@@ -1,10 +1,14 @@
#[path = "../common/test_case.rs"]
mod test_case;
+mod default_policy_test;
+mod pool_builder_test;
+mod pool_optimizer_test;
mod pool_test;
mod request_test;
mod rule_set_iterator_test;
mod rule_set_test;
mod security_advisory_pool_filter_test;
+mod solver_test;
mod rule_test;
mod transaction_test;
diff --git a/crates/shirabe/tests/dependency_resolver/pool_builder_test.rs b/crates/shirabe/tests/dependency_resolver/pool_builder_test.rs
index 2290f45..617c7b9 100644
--- a/crates/shirabe/tests/dependency_resolver/pool_builder_test.rs
+++ b/crates/shirabe/tests/dependency_resolver/pool_builder_test.rs
@@ -1 +1,9 @@
//! ref: composer/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php
+
+// testPoolBuilder is a large fixture-driven case that loads packages from test inputs and
+// builds a Pool; constraint parsing uses a look-around regex the regex crate cannot compile.
+#[test]
+#[ignore = "not yet ported (fixture-driven PoolBuilder; constraint parsing uses a look-around regex)"]
+fn test_pool_builder() {
+ todo!()
+}
diff --git a/crates/shirabe/tests/dependency_resolver/pool_optimizer_test.rs b/crates/shirabe/tests/dependency_resolver/pool_optimizer_test.rs
index bf7592e..a25aec6 100644
--- a/crates/shirabe/tests/dependency_resolver/pool_optimizer_test.rs
+++ b/crates/shirabe/tests/dependency_resolver/pool_optimizer_test.rs
@@ -1 +1,9 @@
//! ref: composer/tests/Composer/Test/DependencyResolver/PoolOptimizerTest.php
+
+// testPoolOptimizer is a large fixture-driven case building and optimizing a Pool;
+// constraint parsing uses a look-around regex the regex crate cannot compile.
+#[test]
+#[ignore = "not yet ported (fixture-driven PoolOptimizer; constraint parsing uses a look-around regex)"]
+fn test_pool_optimizer() {
+ todo!()
+}
diff --git a/crates/shirabe/tests/dependency_resolver/solver_test.rs b/crates/shirabe/tests/dependency_resolver/solver_test.rs
index 30f7957..9fc0434 100644
--- a/crates/shirabe/tests/dependency_resolver/solver_test.rs
+++ b/crates/shirabe/tests/dependency_resolver/solver_test.rs
@@ -1 +1,55 @@
//! ref: composer/tests/Composer/Test/DependencyResolver/SolverTest.php
+
+// 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() {
+ 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);