On Mon, 2020-06-01 at 08:41 +0000, Atila Neves via Digitalmars-d-announce wrote: […] > Out of curiosity, what is the difference for you between: > > testFoo() { /* ... */ } > > and: > > @("foo") > unittest { /* ... */ }
Primarily consistency with the way all other unit test frameworks which are based on test functions – I am not a fan of class-based unit tests hence using pytest in favour of unittest in Python. Using functions just feels more normal. Secondarily lack of understanding of the scope rules of multiple unittest blocks. In the end though I use whatever is provided. So if functions are for the chop, I will switch to using labelled unittest blocks. -- Russel. =========================================== Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
signature.asc
Description: This is a digitally signed message part