https://kotlinlang.org logo
#language-proposals
Title
# language-proposals
x

xenoterracide

01/14/2019, 11:07 PM
hmm... idea, keyword
test
on a class makes the class internal, and so that you can't directly call any constructors. on a method it would make it internal (is this a thing for a method?). Motivation, avoid ID10T errors involving trying to new up the test in your code, vs trying to new up the class under test 😕 also the internal keyword is long and test reads better.
😱 2
r

rrader

01/15/2019, 7:57 PM
keyword
test
on a class makes the class internal
How
test
can reads better than
internal
if the class is internal?
x

xenoterracide

01/15/2019, 8:38 PM
'cause it would say
test class
instead of
internal class
actually I would consider going further on reflection, a test class would be private to kotlin by default, nothing else should be able to reference it