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

Clearly mark the test() method that it crosses the test boundaries #1

Open
mvysny opened this issue Feb 13, 2018 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@mvysny
Copy link
Owner

mvysny commented Feb 13, 2018

There is no clear distinction between the code that creates tests (calls the test() method), and
the testing code itself (blocks inside of test() method). However, there is a ton of difference:
those two code bases run at completely different time. Furthermore Kotlin allows to share variables
freely between those two code bases, which may create a really dangerous code which fails in mysterious ways.

That's magic which must be removed. The test() method must yell a big warning sign that the programmer is crossing code boundaries. I'm thinking about renaming the test() method to something else, but I'm not really satisfied with any of the candidates:

  • post() - not really a test
  • postTest() - too long
  • marking test() deprecated - stupid :-)
@mvysny mvysny self-assigned this Feb 13, 2018
@mvysny mvysny added the enhancement New feature or request label Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant