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/downloader/file_downloader_test.rs | |
| 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/downloader/file_downloader_test.rs')
| -rw-r--r-- | crates/shirabe/tests/downloader/file_downloader_test.rs | 78 |
1 files changed, 60 insertions, 18 deletions
diff --git a/crates/shirabe/tests/downloader/file_downloader_test.rs b/crates/shirabe/tests/downloader/file_downloader_test.rs index 6e123e1..9e376be 100644 --- a/crates/shirabe/tests/downloader/file_downloader_test.rs +++ b/crates/shirabe/tests/downloader/file_downloader_test.rs @@ -7,23 +7,65 @@ fn set_up() { // These construct a FileDownloader with a mocked IO/HttpDownloader (curl_multi_init todo!()) // and a mocked Cache/Package to drive download/checksum behaviour. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] - fn $name() { - set_up(); - todo!() - } - }; +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_for_package_without_dist_reference() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_to_existing_file() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_get_file_name() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_but_file_is_unsaved() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_with_custom_processed_url() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_with_custom_cache_key() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_cache_garbage_collection_is_called() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_file_with_invalid_checksum() { + set_up(); + todo!() } -stub!(test_download_for_package_without_dist_reference); -stub!(test_download_to_existing_file); -stub!(test_get_file_name); -stub!(test_download_but_file_is_unsaved); -stub!(test_download_with_custom_processed_url); -stub!(test_download_with_custom_cache_key); -stub!(test_cache_garbage_collection_is_called); -stub!(test_download_file_with_invalid_checksum); -stub!(test_downgrade_shows_appropriate_message); +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_downgrade_shows_appropriate_message() { + set_up(); + todo!() +} |
