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/package/loader | |
| 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/package/loader')
| -rw-r--r-- | crates/shirabe/tests/package/loader/array_loader_test.rs | 190 | ||||
| -rw-r--r-- | crates/shirabe/tests/package/loader/validating_array_loader_test.rs | 33 |
2 files changed, 179 insertions, 44 deletions
diff --git a/crates/shirabe/tests/package/loader/array_loader_test.rs b/crates/shirabe/tests/package/loader/array_loader_test.rs index 79b5d78..2dc4f3e 100644 --- a/crates/shirabe/tests/package/loader/array_loader_test.rs +++ b/crates/shirabe/tests/package/loader/array_loader_test.rs @@ -8,37 +8,163 @@ fn set_up() -> ArrayLoader { // ArrayLoader::load parses version/link constraints through a look-around regex the regex // crate cannot compile. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] - fn $name() { - let _loader = set_up(); - todo!() - } - }; +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_self_version() { + let _loader = set_up(); + todo!() } -stub!(test_self_version); -stub!(test_type_default); -stub!(test_normalized_version_optimization); -stub!(test_parse_dump_default_load_config); -stub!(test_parse_dump_true_load_config); -stub!(test_parse_dump_false_load_config); -stub!(test_package_with_branch_alias); -stub!(test_package_aliasing_without_branch_alias); -stub!(test_abandoned); -stub!(test_not_abandoned); -stub!(test_plugin_api_version_are_kept_as_declared); -stub!(test_plugin_api_version_does_support_self_version); -stub!(test_parse_links_integer_target); -stub!(test_parse_links_invalid_version); -stub!(test_none_string_version); -stub!(test_none_string_source_dist_reference); -stub!(test_branch_alias_integer_index); -stub!(test_package_links_require); -stub!(test_package_links_require_invalid); -stub!(test_package_links_replace); -stub!(test_package_links_replace_invalid); -stub!(test_support_string_value); -stub!(test_invalid_version); +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_type_default() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_normalized_version_optimization() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_dump_default_load_config() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_dump_true_load_config() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_dump_false_load_config() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_with_branch_alias() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_aliasing_without_branch_alias() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_abandoned() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_not_abandoned() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_plugin_api_version_are_kept_as_declared() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_plugin_api_version_does_support_self_version() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_links_integer_target() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_links_invalid_version() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_none_string_version() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_none_string_source_dist_reference() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_branch_alias_integer_index() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_require() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_require_invalid() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_replace() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_replace_invalid() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_support_string_value() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_invalid_version() { + let _loader = set_up(); + todo!() +} diff --git a/crates/shirabe/tests/package/loader/validating_array_loader_test.rs b/crates/shirabe/tests/package/loader/validating_array_loader_test.rs index 6e4425d..9858df1 100644 --- a/crates/shirabe/tests/package/loader/validating_array_loader_test.rs +++ b/crates/shirabe/tests/package/loader/validating_array_loader_test.rs @@ -2,17 +2,26 @@ // ValidatingArrayLoader wraps ArrayLoader, whose constraint parsing uses a look-around // regex the regex crate cannot compile; the success/warning data sets are large. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_success() { + todo!() } -stub!(test_load_success); -stub!(test_load_failure_throws_exception); -stub!(test_load_warnings); -stub!(test_load_skips_warning_data_when_ignoring_errors); +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_failure_throws_exception() { + todo!() +} + +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_warnings() { + todo!() +} + +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_skips_warning_data_when_ignoring_errors() { + todo!() +} |
