aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/downloader/download_manager_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 13:11:49 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 13:11:49 +0900
commitf0f5f084c883dc4f5b6e61603e82cd1c2092fd9d (patch)
treea8b91efea7f17e61a8d0d9a82604d3ed964010a7 /crates/shirabe/tests/downloader/download_manager_test.rs
parentb1571202200e4dc630202928f5ff78959273c7ec (diff)
downloadphp-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.gz
php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.zst
php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/downloader/download_manager_test.rs')
-rw-r--r--crates/shirabe/tests/downloader/download_manager_test.rs254
1 files changed, 214 insertions, 40 deletions
diff --git a/crates/shirabe/tests/downloader/download_manager_test.rs b/crates/shirabe/tests/downloader/download_manager_test.rs
index 4bb0f0b..f9c44f4 100644
--- a/crates/shirabe/tests/downloader/download_manager_test.rs
+++ b/crates/shirabe/tests/downloader/download_manager_test.rs
@@ -7,45 +7,219 @@ fn set_up() {
// These mock IO and individual downloaders to drive DownloadManager's selection/download/
// update/remove logic; mocking is not available here.
-macro_rules! stub {
- ($name:ident) => {
- #[test]
- #[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
- fn $name() {
- set_up();
- todo!()
- }
- };
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_set_get_downloader() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_downloader_for_incorrectly_installed_package() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_downloader_for_correctly_installed_dist_package() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_downloader_for_incorrectly_installed_dist_package() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_downloader_for_correctly_installed_source_package() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_downloader_for_incorrectly_installed_source_package() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_downloader_for_metapackage() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_full_package_download() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_full_package_download_failover() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_bad_package_download() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_dist_only_package_download() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_source_only_package_download() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_metapackage_package_download() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_full_package_download_with_source_preferred() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_dist_only_package_download_with_source_preferred() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_source_only_package_download_with_source_preferred() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_bad_package_download_with_source_preferred() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_update_dist_with_equal_types() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_update_dist_with_not_equal_types() {
+ set_up();
+ todo!()
}
-stub!(test_set_get_downloader);
-stub!(test_get_downloader_for_incorrectly_installed_package);
-stub!(test_get_downloader_for_correctly_installed_dist_package);
-stub!(test_get_downloader_for_incorrectly_installed_dist_package);
-stub!(test_get_downloader_for_correctly_installed_source_package);
-stub!(test_get_downloader_for_incorrectly_installed_source_package);
-stub!(test_get_downloader_for_metapackage);
-stub!(test_full_package_download);
-stub!(test_full_package_download_failover);
-stub!(test_bad_package_download);
-stub!(test_dist_only_package_download);
-stub!(test_source_only_package_download);
-stub!(test_metapackage_package_download);
-stub!(test_full_package_download_with_source_preferred);
-stub!(test_dist_only_package_download_with_source_preferred);
-stub!(test_source_only_package_download_with_source_preferred);
-stub!(test_bad_package_download_with_source_preferred);
-stub!(test_update_dist_with_equal_types);
-stub!(test_update_dist_with_not_equal_types);
-stub!(test_get_available_sources_update_sticks_to_same_source);
-stub!(test_update_metapackage);
-stub!(test_remove);
-stub!(test_metapackage_remove);
-stub!(test_install_preference_without_preference_dev);
-stub!(test_install_preference_without_preference_no_dev);
-stub!(test_install_preference_without_match_dev);
-stub!(test_install_preference_without_match_no_dev);
-stub!(test_install_preference_with_match_auto_dev);
-stub!(test_install_preference_with_match_auto_no_dev);
-stub!(test_install_preference_with_match_source);
-stub!(test_install_preference_with_match_dist);
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_get_available_sources_update_sticks_to_same_source() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_update_metapackage() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_remove() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_metapackage_remove() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_without_preference_dev() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_without_preference_no_dev() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_without_match_dev() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_without_match_no_dev() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_with_match_auto_dev() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_with_match_auto_no_dev() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_with_match_source() {
+ set_up();
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"]
+fn test_install_preference_with_match_dist() {
+ set_up();
+ todo!()
+}