Rust: Add a couple of test cases for data flow through conversions#19067
Rust: Add a couple of test cases for data flow through conversions#19067geoffw0 merged 3 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds test cases in Rust for verifying data flow through type conversions without requiring changes to core library code.
- Added function "conversions" with various conversion methods using the as, into, and i64::from conversions.
- Updated the main function to invoke the new conversions test.
Files not reviewed (2)
- rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected: Language not supported
- rust/ql/test/library-tests/dataflow/local/inline-flow.expected: Language not supported
Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more
paldepind
left a comment
There was a problem hiding this comment.
LGTM.
I assume that once we can write models directly for traits we'll want to write taint steps for From and Into.
Btw, I actually created the dataflow/modeled directory, thinking it should hold tests that are about things being modeled. But I never really made that intention clear to anyone. If you think it's nice to have such a division, we could do that going forward.
Very much yes.
That's great, in practice we'll get coverage from query tests and some other data flow tests as well. |
Add a couple of test cases for data flow through conversions.
I was interested in the
ascase, which we do in fact get flow through so no code changes were necessary.