From f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 13:11:49 +0900 Subject: 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) --- .../shirabe/tests/util/http/proxy_manager_test.rs | 74 ++++++++++++++++------ 1 file changed, 55 insertions(+), 19 deletions(-) (limited to 'crates/shirabe/tests/util/http') diff --git a/crates/shirabe/tests/util/http/proxy_manager_test.rs b/crates/shirabe/tests/util/http/proxy_manager_test.rs index 0ed059d..0c177f7 100644 --- a/crates/shirabe/tests/util/http/proxy_manager_test.rs +++ b/crates/shirabe/tests/util/http/proxy_manager_test.rs @@ -37,22 +37,58 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] - fn $name() { - let _tear_down = TearDown; - set_up(); - todo!() - } - }; -} - -stub!(test_instantiation); -stub!(test_get_proxy_for_request_throws_on_bad_proxy_url); -stub!(test_lowercase_overrides_uppercase); -stub!(test_cgi_proxy_is_only_used_when_no_http_proxy); -stub!(test_no_http_proxy_does_not_use_https_proxy); -stub!(test_no_https_proxy_does_not_use_http_proxy); -stub!(test_get_proxy_for_request); +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_instantiation() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_get_proxy_for_request_throws_on_bad_proxy_url() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_lowercase_overrides_uppercase() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_cgi_proxy_is_only_used_when_no_http_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_no_http_proxy_does_not_use_https_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_no_https_proxy_does_not_use_http_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_get_proxy_for_request() { + let _tear_down = TearDown; + set_up(); + todo!() +} -- cgit v1.3.1