-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAST based MATLAB testing #583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
cast = parser.out_cast | ||
""" Tests parser assignment CAST """ | ||
|
||
source = 'x = 5;' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think hardcoding the source like this is okay to do for the tests right now, I do effectively this in my test scripts, but I want to note that at some point we will be changing tests to access test files that are online on a google drive. I think we just haven't decided how to go about doing that yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's how I had been doing it. I can easily switch back if needed.
## Testing of MATLAB idioms using CAST structures This PR is a refactor of the original test plan where MATLAB parser output was tested as a python dictionary. CAST testing uses fewer lines of code to achieve the same results and follows existing SKEMA test plans. ## Relevant Features - CAST elements are used to test MATLAB idioms - Source code is now defined within each test file - The test file data directory is no longer needed and has been removed - The MATLAB parser now takes file or string source code input ## Related Issues - Completes issue #570 --------- Co-authored-by: Joseph Astier <[email protected]> 52de34d
## CAST test upgrades This PR includes some test utilities for use when testing CAST output, so common tests such as an assignment or an expression can be done as single function calls. Some debug scripts are now executables. Minor edits and code cleanup ## What's New - Added `skema/program_analysis/CAST/matlab/tests/utils.py` with functions for common testing tasks - Added 3 conditional logic tests: `if` `if else` `if elseif else` ## Relevant issues Related to PR #613 and #583 --------- Co-authored-by: Joseph Astier <[email protected]>
## CAST test upgrades This PR includes some test utilities for use when testing CAST output, so common tests such as an assignment or an expression can be done as single function calls. Some debug scripts are now executables. Minor edits and code cleanup ## What's New - Added `skema/program_analysis/CAST/matlab/tests/utils.py` with functions for common testing tasks - Added 3 conditional logic tests: `if` `if else` `if elseif else` ## Relevant issues Related to PR #613 and #583 --------- Co-authored-by: Joseph Astier <[email protected]> 77c96cb
Testing of MATLAB idioms using CAST structures
This PR is a refactor of the original test plan where MATLAB parser output was tested as a python dictionary. CAST testing uses fewer lines of code to achieve the same results and follows existing SKEMA test plans.
Relevant Features
Related Issues