Skip to content

Conversation

@alexcrocha
Copy link

@alexcrocha alexcrocha commented Oct 24, 2025

This PR originally was testing RBSString by manually instantiating it and verifying its methods. Now it adds a parse function that enables testing our Rust structures through the parser integration level, following the review feedback that parser integration tests will cover everything we need without requiring separate unit tests.

The parse function provides a safe Rust interface to the C parser. While we can't yet access parsed AST fields to fully verify string translation (requires more bindings), this establishes the foundation for parser-based testing going forward.

@alexcrocha alexcrocha mentioned this pull request Oct 24, 2025
Copy link
Author

alexcrocha commented Oct 24, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alexcrocha alexcrocha marked this pull request as ready for review October 24, 2025 11:22
}

#[test]
fn test_rbs_string_new() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we need this test or if we should keep all of our testing at the parser integration level. My gut feeling is that we could just test all of our Rust structures through the result of parsing RBS code and avoid manually instantiating anything.

What do you think? Do you think we lose any guarantees if we test everything through the parser?

@alexcrocha alexcrocha changed the base branch from 10-22-implement_rbsstring_struct to graphite-base/53 October 28, 2025 12:59
@alexcrocha alexcrocha force-pushed the 10-24-add_tests_for_rbsstring branch from 91a4364 to 2320c10 Compare October 28, 2025 12:59
@alexcrocha alexcrocha changed the base branch from graphite-base/53 to ar-rust-rbs-build October 28, 2025 12:59
Implement the parse function that enables parsing RBS code from Rust.
This provides a safe Rust interface to the C parser, handling memory
management and encoding setup.
@alexcrocha alexcrocha force-pushed the 10-24-add_tests_for_rbsstring branch from 2320c10 to 734389f Compare October 28, 2025 13:02
@alexcrocha alexcrocha changed the title Add tests for RBSString Add parse function to Rust RBS bindings Oct 28, 2025
@alexcrocha alexcrocha requested a review from vinistock October 28, 2025 13:19
alexcrocha added a commit that referenced this pull request Jan 13, 2026
The `parse` function enables parsing RBS code from Rust.
This provides a safe Rust interface to the C parser, handling memory
management and encoding setup.
alexcrocha added a commit that referenced this pull request Jan 13, 2026
The `parse` function enables parsing RBS code from Rust.
This provides a safe Rust interface to the C parser, handling memory
management and encoding setup.
alexcrocha added a commit that referenced this pull request Jan 14, 2026
The `parse` function enables parsing RBS code from Rust.
This provides a safe Rust interface to the C parser, handling memory
management and encoding setup.
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.

2 participants