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

Add suspend alternative to Data Driven Testing #712

Merged

Conversation

LeoColman
Copy link
Member

This commit creates a suspended alternative for the data driven testing methods. It also inlines all possible functions in TableTesting. The same approach was not used for the data driven due to the fact that we're using reflect on the functions to obtain the parameter name, and that makes inlining impossible.

To avoid too many maintenance points, I decided to refactor the functions a little bit, so that the execution could be used both in the normal version and the suspended version, shortening the code a little bit.

However, I couldn't find any alternatives for the tests, so I duplicated every test that tested the data driven functions to use the suspended overload. An important note on this is that the function name is not forallSuspendOverload, it's just how I imported it.

Fixes #707

This commit creates a suspended alternative for the data driven testing methods. It also inlines all possible functions in TableTesting. The same approach was not used for the data driven due to the fact that we're using reflect on the functions to obtain the parameter name, and that makes inlining impossible.

To avoid too many maintenance points, I decided to refactor the functions a little bit, so that the execution could be used both in the normal version and the suspended version, shortening the code a little bit.

However, I couldn't find any alternatives for the tests, so I duplicated every test that tested the data driven functions to use the suspended overload. An important note on this is that the function name is not `forallSuspendOverload`, it's just how I imported it.

Fixes #707
@LeoColman LeoColman requested a review from sksamuel March 6, 2019 16:37
@LeoColman LeoColman merged commit 50a355f into master Mar 8, 2019
@LeoColman LeoColman deleted the hotfix/707-data-driven-tests-and-suspend-function branch March 8, 2019 14:10
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.

2 participants