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

test(feel): verify non-existing member access #541

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

nikku
Copy link
Contributor

@nikku nikku commented Jan 19, 2023

Ensures the following is true:

{ a: 1 }.b = null

null.b = null

Related to #537

@nikku nikku marked this pull request as ready for review January 19, 2023 08:14
@nikku nikku force-pushed the 537-null-context-access branch from ddc331f to 91ed70f Compare January 19, 2023 08:16
@nikku nikku force-pushed the 537-null-context-access branch from b99bf6f to ea6c3a5 Compare January 19, 2023 08:30
@baldimir
Copy link
Collaborator

@dmn-tck/contributors please review

@opatrascoiu
Copy link
Contributor

opatrascoiu commented Feb 21, 2023

Thank you for the tests.

They look correct to me.

However, there are only 6 test cases that test the selection for lists and contexts. I recommend moving the tests for lists (4) in 0069-feel-list and the ones for context (2) in 0057-feel-context. It will make our life easier when designing new tests to improve the coverage - have tests for sections 10.3.2.5 Lists and filters and 10.3.2.6 Context in only two separate files.

Also, move the expected values where they belong, in the .xml file not in the dmn file. The expected value can be mentioned in a comment in the dmn file. I believe @StrayAlien used this pattern in lots of our test cases.

@baldimir
Copy link
Collaborator

Hi @nikku, could you please check the last comment from @opatrascoiu?

@nikku
Copy link
Contributor Author

nikku commented Apr 20, 2023

@baldimir Thanks for the reminder. This is on my TODO-list. I just was not able to get into it.

@nikku
Copy link
Contributor Author

nikku commented Apr 21, 2023

@opatrascoiu to verify I understand you correctly:

I recommend moving the tests for lists (4) in 0069-feel-list and the ones for context (2) in 0057-feel-context.

  • Shall I move the new tests to 0069-feel-list and 0057-feel-context, or shall I move tests in 0069-feel-list and 0057-feel-context somewhere? If so, where to?

Also, move the expected values where they belong, in the .xml file not in the dmn file.

  • Could you share a source code reference to the "recommended test pattern"? I'm happy to follow what is most reasonable for you but I don't see a clear pattern across the code base at the moment yet.

@opatrascoiu
Copy link
Contributor

@nikku Regarding the test patterns: For example, it is recommended to have test cases related to a certain behaviour (e.g. a certain function, class) in the same place (e.g. file).

Please move the new tests related to lists (e.g. filters) to 0069-feel-list and the ones related to contexts (e.g. path navigation) in 0057-feel-context.

Thank you.

@nikku nikku force-pushed the 537-null-context-access branch from ea6c3a5 to 7def45c Compare May 24, 2023 09:02
@nikku
Copy link
Contributor Author

nikku commented May 24, 2023

@opatrascoiu I updated this PR, moving the tests around as you suggested. Please have another look.

@opatrascoiu
Copy link
Contributor

@nikku Apologies for the delay. Thank you very much for the contribution. The tests look good to me.

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.

3 participants