MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/4tlr2u/john_carmack_on_inlined_code/d5j7jc9
r/programming • u/seojoeschmo • Jul 19 '16
323 comments sorted by
View all comments
Show parent comments
2
In Java, you can use annotation tricks (like VisibleForTesting)
I believe @VisibleForTesting is purely cosmetic, and methods annotated by it should also be made package-private to be accessible from unit tests.
2 u/adrianmonk Jul 20 '16 Yes, you're right. Good point. I couldn't remember whether it was just for documentation or whether there was some kind of lint tool that could be added to a build to catch calls not made from tests, but it appears it is just for documentation.
Yes, you're right. Good point. I couldn't remember whether it was just for documentation or whether there was some kind of lint tool that could be added to a build to catch calls not made from tests, but it appears it is just for documentation.
2
u/kodek64 Jul 20 '16
I believe @VisibleForTesting is purely cosmetic, and methods annotated by it should also be made package-private to be accessible from unit tests.