[Lldb-commits] [PATCH] D16936: Remove expectedFailureWindows decorator

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 8 10:06:21 PST 2016


tberghammer added a comment.

In http://reviews.llvm.org/D16936#346536, @tfiala wrote:

> > I agree but I also might consider going further where the only thing you can specify is a function and we remove all arguments. Then we implement functions like architectureMatches, targetOsMatches, hostOsMatches, etc.. and some logical function what can combine them (e.g. not, any_of, all_of). This way we just build up the condition in the decorator and we don't have a lot of check inside expectedFailure. What do you think?
>
>
> That does sound pretty appealing.
>
> So then there would be some kind of combinator functions that do the equivalent of "or" and "and" logical operations?  So you can get something like ((tes1() && test2()) or test3())?
>
> -Todd


I think we need an extra level of function nesting so the conditions only evaluated during the execution of the test. Because of it all test function will have to return a function (taking no argument) and we can't apply binary operators to them directly so I expect something like this: or(and(test1(), test2()), test3()) If you want to use binary operators then we have to use operator overloading what is a bit more work and I am not sure if it worth it but it is still possible.


http://reviews.llvm.org/D16936





More information about the lldb-commits mailing list