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

Convert Array tests to table-driven style #351

Closed
6 tasks
gavv opened this issue Mar 29, 2023 · 2 comments · Fixed by #364
Closed
6 tasks

Convert Array tests to table-driven style #351

gavv opened this issue Mar 29, 2023 · 2 comments · Fixed by #364
Assignees
Labels
good first issue Good for newcomers help wanted Contributions are welcome refactoring Refactoring task tests Improvements or additions to tests
Milestone

Comments

@gavv
Copy link
Owner

gavv commented Mar 29, 2023

Convert each subtest of the following tests to table-driven style:

  • TestArray_ConsistsOf
  • TestArray_Contains
  • TestArray_ContainsAll
  • TestArray_ContainsAny
  • TestArray_ContainsOnly
  • TestArray_HasValue

TestNumber_IsEqual/basic can be used as a reference for table-driven style.

For subtests that do only a few checks (e.g. TestNumber_IsEqual/invalid argument has only two checks), instead of table we can use the same approach as in TestNumber_IsInt/invalid argument, where we create a fresh number for each check.

@gavv gavv added tests Improvements or additions to tests help wanted Contributions are welcome refactoring Refactoring task good first issue Good for newcomers labels Mar 29, 2023
@gavv gavv changed the title Convert Array tests to table-style Convert Array tests to table-driven style Mar 29, 2023
@frankweate
Copy link
Contributor

Hey gavv! I'd be happy to do this if you want?

@gavv
Copy link
Owner Author

gavv commented Mar 30, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributions are welcome refactoring Refactoring task tests Improvements or additions to tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants