Skip to content

Conversation

@ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Jan 23, 2026

Extract Inline Tests to Centralized Test Directory

  1. Create 9 new test files in light_pdas_tests/ - Extract ~116 unit tests from inline #[cfg(test)] blocks to dedicated test modules (light_account_tests.rs, seed_extraction_tests.rs, parsing_tests.rs,
    derive_tests.rs, light_compressible_tests.rs, light_account_keywords_tests.rs, visitors_tests.rs, crate_context_tests.rs, shared_utils_tests.rs)
  2. Consolidate fuzzing and property tests - Move fuzz targets from standalone sdk-libs/macros/fuzz/ directory into centralized light_pdas_tests/ directory (fuzz_tests.rs, e2e_prop_tests.rs,
    keywords_prop_tests.rs, parse_prop_tests.rs, prop_tests.rs, shared_utils_prop_tests.rs)
  3. Update test visibility - Change 9 internal functions and 2 types from private/pub(super) to pub(crate) to allow access from test modules (parse_light_account_attr, LightMintField, check_light_account_type,
    call_has_ctx_arg, has_derive_attribute, FieldExtractor, etc.)
  4. Reorganize module visibility - Make light_pdas/accounts/light_account, mint, and light_pdas/program/crate_context, parsing, visitors modules pub(crate) for testing access
  5. Update dependencies - Add proptest and rand to light-sdk-macros Cargo.toml for comprehensive test infrastructure
  6. Fix clippy warnings - Resolve let_and_return and cmp_owned clippy errors in test files
  7. Remove old fuzz infrastructure - Delete separate fuzz directory (sdk-libs/macros/fuzz/) and Cargo configuration; use unified testing in light_pdas_tests
  8. Update test module index - Modify light_pdas_tests/mod.rs to include all 9 new unit test modules alongside existing property/fuzz tests

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (5)
  • wip
  • draft
  • temp
  • test
  • experimental

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jorrit/test-light-sdk-macros

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@SwenSchaeferjohann SwenSchaeferjohann merged commit 430b0a0 into main Jan 24, 2026
22 of 23 checks passed
@SwenSchaeferjohann SwenSchaeferjohann deleted the jorrit/test-light-sdk-macros branch January 24, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants