mvysny/dynatest

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

mvysny opened this issue · 0 comments

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 :-)