diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 13:11:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 13:11:49 +0900 |
| commit | f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d (patch) | |
| tree | a8b91efea7f17e61a8d0d9a82604d3ed964010a7 /crates/shirabe/tests/installer | |
| parent | b1571202200e4dc630202928f5ff78959273c7ec (diff) | |
| download | php-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/installer')
3 files changed, 159 insertions, 52 deletions
diff --git a/crates/shirabe/tests/installer/installation_manager_test.rs b/crates/shirabe/tests/installer/installation_manager_test.rs index 58d0834..b44a814 100644 --- a/crates/shirabe/tests/installer/installation_manager_test.rs +++ b/crates/shirabe/tests/installer/installation_manager_test.rs @@ -8,21 +8,50 @@ fn set_up() { // These mock individual installers, the repository and IO to drive InstallationManager's // add/execute/install/update/uninstall logic; mocking is not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_add_get_installer() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_add_remove_installer() { + todo!() } -stub!(test_add_get_installer); -stub!(test_add_remove_installer); -stub!(test_execute); -stub!(test_install); -stub!(test_update_with_equal_types); -stub!(test_update_with_not_equal_types); -stub!(test_uninstall); -stub!(test_install_binary); +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_execute() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_install() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_update_with_equal_types() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_update_with_not_equal_types() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_uninstall() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_install_binary() { + todo!() +} diff --git a/crates/shirabe/tests/installer/library_installer_test.rs b/crates/shirabe/tests/installer/library_installer_test.rs index 1262970..2182962 100644 --- a/crates/shirabe/tests/installer/library_installer_test.rs +++ b/crates/shirabe/tests/installer/library_installer_test.rs @@ -22,22 +22,56 @@ impl Drop for TearDown { // These construct a LibraryInstaller over a temp dir with a mocked IO/Filesystem/repository // and mocked packages to drive install/update/uninstall and path resolution. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_installer_creation_should_not_create_vendor_directory() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_installer_creation_should_not_create_bin_directory() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_is_installed() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_install() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_update() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_uninstall() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_get_install_path_without_target_dir() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_get_install_path_with_target_dir() { + todo!() } -stub!(test_installer_creation_should_not_create_vendor_directory); -stub!(test_installer_creation_should_not_create_bin_directory); -stub!(test_is_installed); -stub!(test_install); -stub!(test_update); -stub!(test_uninstall); -stub!(test_get_install_path_without_target_dir); -stub!(test_get_install_path_with_target_dir); -stub!(test_ensure_binaries_installed); +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_ensure_binaries_installed() { + todo!() +} diff --git a/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs b/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs index e47a73a..fbdb16f 100644 --- a/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs +++ b/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs @@ -8,24 +8,68 @@ fn set_up() { // These construct a SuggestedPackagesReporter with a mocked IO and assert its accumulated // suggestions and formatted output; mocking is not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_constructor() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_get_packages_empty_by_default() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_get_packages() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_add_package_appends() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_add_suggestions_from_package() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_with_no_suggestion_reason() { + todo!() } -stub!(test_constructor); -stub!(test_get_packages_empty_by_default); -stub!(test_get_packages); -stub!(test_add_package_appends); -stub!(test_add_suggestions_from_package); -stub!(test_output); -stub!(test_output_with_no_suggestion_reason); -stub!(test_output_ignores_formatting); -stub!(test_output_multiple_packages); -stub!(test_output_skip_installed_packages); -stub!(test_output_not_getting_installed_packages_when_no_suggestions); +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_ignores_formatting() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_multiple_packages() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_skip_installed_packages() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_not_getting_installed_packages_when_no_suggestions() { + todo!() +} |
