-
Notifications
You must be signed in to change notification settings - Fork 3
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
Test script editing needs some updates to support coded tests #170
Comments
@aytey The first two items should be easy, the third one might be a little tricky, so let me know if Denis needs help |
Note: @johnpaliotta is going to remove When we come to solve this case, we need to re-enable |
|
## Summary Updates script editing to support coded tests and resolves #170. ## Changed - Updated the CI workflow to ensure the coverage report for version `2024sp5` is uploaded to Codecov, replacing the previous version `2021`. ## Added - **Syntax Support for `TEST.CODED_TEST_FILE`:** - Added `TEST.CODED_TEST_FILE` as a valid syntax in `.tst` files. - Enabled auto-complete for `TEST.CODED_TEST_FILE` after typing `TEST.`. - Ensured no auto-completion for the file path after `:`. - **Behavior When `TEST.SUBPROGRAM` is `coded_tests_driver`:** - Allowed `TEST.CODED_TEST_FILE` without error diagnostics. - Disallowed `TEST.VALUE` and `TEST.EXPECTED` lines, ensuring they give error diagnostics. - **Behavior When `TEST.SUBPROGRAM` is Not `coded_tests_driver`:** - Disallowed `TEST.CODED_TEST_FILE`, ensuring it gives an error diagnostic. - Removed `coded_tests_driver` from the subprogram list for `TEST.VALUE` and `TEST.EXPECTED` lines. - **Error Handling Enhancements:** - Reviewed and ensured consistency in error messages related to these changes. - **Tests** - Added tests for new diagnostics - **Autocompletion list for `TEST.SUBPROGRAM`** without using the fake `TEST.VALUE` line - In order to get the autocompletion list for `TEST.SUBPROGRAM`, we need the `<unit>` from `TEST.UNIT`. - This is retrieved with `getNearest()` in `tstCompletion.ts`. - This `<unit>` is sent as an additional parameter to the Python logic. - In `processSubprogramLines()` (tstUtilities.py), we use this `<unit>` to retrieve, with `getFunctions()`, the `autocompletion` list of all the functions in this unit from the `DataAPI`. - At the end, we add SUBPROGRAM-specific autocompletions like `<<INIT>>, <<COMPOUND>>, <<coded_tests_driver>>`.
There are a few improvements needed - in the main branch
TEST.CODED_TEST_FILE
should be added as a valid syntax in a .tst file (it should appear in the auto-complete list when you type inTEST.
, and not give an error when you type in):
will be a file path (this could be relative or absolute), but we do not want to do auto-completion on the filename (i.e., forTEST.CODED_TEST_FILE
there is no autocomplete after:
)TEST.SUBPROGRAM
is set to:coded_tests_driver
TEST.CODED_TEST_FILE
should be allowed (that is, it should not give error diagnostics)TEST.VALUE
andTEST.EXPECTED
lines should not be allowed (these should give error diagnostics)TEST.SUBPROGRAM
is not set to:coded_tests_driver
TEST.CODED_TEST_FILE
should not be allowed (i.e., it should now give an error diagnostic)coded_tests_driver
should not show up in the subprogram list forTEST.VALUE
andTEST.EXPECTED
linesTEST.VALUE:<unit>.
you will get a list of all of the subprograms in<unit>
-- DataAPI will tell you thatcoded_tests_driver
is in<unit>
, but we want to hide that from a user (the same for `TEST.EXPECTED)Note:
tstCompletions.ts, comment: // TBD will need to change how this is done during the fix for issue #170
TEST.SUBPROGRAM
is a little bit of a hack and will need to changeTEST.VALUE:unit.
line to get the list of subprogramsgetFunctionList()
TEST.SLOT
linesgetFunctionList()
getFunctionList()
is the "core" of the interaction between VS Code and VectorCAST, and is probably the place wherecoded_test_driver
should be filtered, but not forTEST.SUBPROGRAM
The text was updated successfully, but these errors were encountered: