Thoughts about unittest run order

H. S. Teoh hsteoh at quickfur.ath.cx
Tue May 7 11:15:31 UTC 2019


On Mon, May 06, 2019 at 10:30:01PM -0700, Walter Bright via Digitalmars-d wrote:
> On 5/6/2019 11:13 AM, H. S. Teoh wrote:
> > What do you guys think about this?
> 
> That thought never occurred to me, thanks for bringing it up.
> 
> It suggests perhaps the order of unittests should be determined by a
> dependency graph, and should start with the leaves.

That was also my first thought, but how would you construct such a
graph? In my case, almost all of the unittests are at module level, and
call various module-level functions.  It's not obvious how the compiler
would divine which ones should come first just by looking at the
unittest body. You'd have to construct the full function call dependency
graph of the entire module to get that information.


T

-- 
Answer: Because it breaks the logical sequence of discussion. / Question: Why is top posting bad?


More information about the Digitalmars-d mailing list