UnkindPartition / tasty

Modern and extensible testing framework for Haskell
638 stars 108 forks source link

Split foldTestTree #363

Closed Bodigrim closed 1 year ago

Bodigrim commented 1 year ago

https://github.com/UnkindPartition/tasty/blob/0debac85701560e8c96cd3705988c50197cb214e/core/Test/Tasty/Core.hs#L410-L427

At the moment foldTestTree does three jobs at once: evaluates options, filters by pattern and actually folds. This PR splits it into three functions, each with its own task.

This refactoring should hopefully guide a better way for #343, but separating concerns is a good thing anyways.

Bodigrim commented 1 year ago

@martijnbastiaan I did not want to overengineer it from the get-go, but the idea is that you can out arbitrary annotations instead of OptionSet. I've updated the PR.

martijnbastiaan commented 1 year ago

Looks good to me!

Bodigrim commented 1 year ago

@martijnbastiaan does it look closer to what could be helpful for your PR?

martijnbastiaan commented 1 year ago

Looks good to me! This is going to make it a bit easier to reason about the changes we'd need to make over there.

martijnbastiaan commented 1 year ago

I'm rebasing my PR on this one to see if there are any unexpected things in here.

Edit: nothing unexpected :)