aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/package/version/version_guesser_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/package/version/version_guesser_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/package/version/version_guesser_test.rs')
-rw-r--r--crates/shirabe/tests/package/version/version_guesser_test.rs114
1 files changed, 89 insertions, 25 deletions
diff --git a/crates/shirabe/tests/package/version/version_guesser_test.rs b/crates/shirabe/tests/package/version/version_guesser_test.rs
index 9b974dd..75d4ae0 100644
--- a/crates/shirabe/tests/package/version/version_guesser_test.rs
+++ b/crates/shirabe/tests/package/version/version_guesser_test.rs
@@ -23,30 +23,94 @@ impl Drop for TearDown {
// These drive VersionGuesser with a mocked ProcessExecutor feeding git/hg command output;
// mocking is not available here.
-macro_rules! stub {
- ($name:ident) => {
- #[test]
- #[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
- fn $name() {
- todo!()
- }
- };
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_hg_guess_version_returns_data() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_guess_version_returns_data() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_guess_version_does_not_see_custom_default_branch_as_non_feature_branch() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_regex()
+ {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_when_on_non_feature_branch()
+ {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_detached_head_becomes_dev_hash() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_detached_fetch_head_becomes_dev_hash_git2() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_detached_commit_head_becomes_dev_hash_git2() {
+ todo!()
}
-stub!(test_hg_guess_version_returns_data);
-stub!(test_guess_version_returns_data);
-stub!(test_guess_version_does_not_see_custom_default_branch_as_non_feature_branch);
-stub!(
- test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming
-);
-stub!(test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_regex);
-stub!(test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_when_on_non_feature_branch);
-stub!(test_detached_head_becomes_dev_hash);
-stub!(test_detached_fetch_head_becomes_dev_hash_git2);
-stub!(test_detached_commit_head_becomes_dev_hash_git2);
-stub!(test_tag_becomes_version);
-stub!(test_tag_becomes_pretty_version);
-stub!(test_invalid_tag_becomes_version);
-stub!(test_numeric_branches_show_nicely);
-stub!(test_remote_branches_are_selected);
-stub!(test_get_root_version_from_env);
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_tag_becomes_version() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_tag_becomes_pretty_version() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_invalid_tag_becomes_version() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_numeric_branches_show_nicely() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_remote_branches_are_selected() {
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"]
+fn test_get_root_version_from_env() {
+ todo!()
+}