Skip to content
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

304 call mocks are not matching call signatures when one or more program parameters are qualified #308

Conversation

ThomasNellemann
Copy link
Collaborator

CALL MOCK and VERIFY CALL will read parameters with qualifiers.

When tests are passed and COBOL is generated, the mocking and verifying is done correctly for CALLs with and without parameters that are written with qualifiers.

Fixing problem where call mocks can´t find the CALL because the call uses qualified variables.
Mock and verify will now find the qualifiers for variables and the arguments can now match CALL´s

Signed-off-by: Thomas N. Kramer <[email protected]>
fix, to handle both in and of in a test case

Signed-off-by: Thomas N. Kramer <[email protected]>
tests for this cobol check enhancement

Signed-off-by: Thomas N. Kramer <[email protected]>
Signed-off-by: Thomas N. Kramer <[email protected]>
Copy link
Collaborator

@dakaa16 dakaa16 left a comment

Choose a reason for hiding this comment

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

I would like some more tests about the arguments. See the test: call_mock_gets_correct_arguments() as an example. A test should exist for arguments with one qualified reference and one with multiple THIS IN SOMETHING IN SOMETHING-ELSE IN ....

I would also like a test for loading in the arguments from the InterpreterController. See it_sets_possible_mock_args() as an example.

Otherwise it looks good 😄

param number \ param type  |   normal   | qualified    | test name
none						covered*						-
									     Covered* 			-
one          				covered*						-
											X				verify_can_attach_to_call_mock_with_one_qualified_argument
							    X 			X				verify_call_mock_with_qualified_arguments_mixed
two							covered*						-
											X				verify_can_attach_to_call_mock_with_qualified_arguments
								X           X				CALL_MOCK_param_is_qualified_two_but_one
three						covered*						-
											X				CALL_MOCK_param_is_qualified_three
								X           X				CALL_MOCK_param_three_is_qualified_three_is_not
many	(5/6)				covered*						-
											X				CALL_MOCK_param_six_is_qualified
								X			X				CALL_MOCK_param_five_is_qualified_six_is_not

* (must be) covered by tests already (I have´nt checked)

Signed-off-by: Thomas N. Kramer <[email protected]>
tests have been reworked to use the assertThrows approach.

Signed-off-by: Thomas N. Kramer <[email protected]>
The file is generated during a test run, and it contains information about the user

Signed-off-by: Thomas N. Kramer <[email protected]>
…obol-check into 304-call-mocks-arent-matching-call-signatures-when-one-or-more-program-parameters-are-qualified

� Conflicts:
�	src/main/java/org/openmainframeproject/cobolcheck/services/cobolLogic/Interpreter.java
�	src/test/cobol/MOCKTEST/MockCallTest.cut
Signed-off-by: Thomas N. Kramer <[email protected]>
Signed-off-by: Thomas N. Kramer <[email protected]>
Signed-off-by: Thomas N. Kramer <[email protected]>
<TestSuiteParser> uses the new class to hold information about the tokens being parsed.
The corresponding unit test has been updated.

Signed-off-by: Thomas N. Kramer <[email protected]>
@Rune-Christensen Rune-Christensen dismissed dakaa16’s stale review September 5, 2023 06:48

The requested changes has been implemented

@ThomasNellemann ThomasNellemann merged commit 5db1138 into Developer Sep 5, 2023
7 checks passed
@ThomasNellemann ThomasNellemann deleted the 304-call-mocks-arent-matching-call-signatures-when-one-or-more-program-parameters-are-qualified branch September 5, 2023 07:08
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.

CALL MOCKS aren't matching CALL signatures, when one or more program parameters are qualified
4 participants