Closed Lexikos closed 4 years ago
It looks like part of a refactor way back in the day by @infogulch . Git Blame shows that the line was changed in commit 42618a4 on Nov 12, 2012, and it looks like at that time he did have Yunit.StdOut as a subclass, but he also authored a bunch of other commits that same day. The next day Uberi changed it in 381b041
I'm not familiar enough with how Uberi and infogulch designed this, so if you think there is redundant code feel free to remove in both branches
Same here: Not very familiar with the design - and as english is not my native language, I don't even understand completely what lex says about the documentation :-)
Is there a purpose to this line in Yunit.ahk?
I guess:
Yunit.Test()
directly, rather than callingYunit.Use(module).Test()
.Yunit.StdOut
doesn't exist.On a related note, Test() is marked as static,
but the documentation recommends creating a Tester and calling Test on the instance, so in that case it's an instance method.
Actually, the documentation doesn't recommend so much as say that it needs to be done that way. I see no mention of Yunit.Test() being called directly. It does say "you do not need to make a new instance of it to use it", but taking the documentation as a whole, the message is that you don't need to instantiate
Yunit
but you do need to instantiateYunit.Tester
(by callingYunit.Use()
).