[libcxx-commits] [PATCH] D62719: A hot fix for exclusive_scan

Thomas Rodgers via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 5 13:27:01 PDT 2019


> 2. If yes, to cover the all cases (to be sure that "enable_if is
present") we have to add more 80 negative test units.

> Agreed.

I wouldn’t say we need all 80 for *this* commit, but I think we should have
this set of tests in place eventually, and this is as good a starting point
as any.

On Mon, Jun 3, 2019 at 6:36 AM Marshall Clow via Phabricator <
reviews at reviews.llvm.org> wrote:

> mclow.lists added a comment.
>
> In D62719#1527089 <https://reviews.llvm.org/D62719#1527089>,
> @MikeDvorskiy wrote:
>
> > In D62719#1525450 <https://reviews.llvm.org/D62719#1525450>, @rodgert
> wrote:
> >
> > > Actually, we should probably get a test of some sort here before
> accepting the change. Yes, it's fairly obviously wrong and the fix is
> fairly obviously correct, but it's a regression and we should provide tests
> for regressions, lest certain standard library maintainers ask
> uncomfortable questions.
> >
> >
> > Do you mean a test should we added which will coverage the fixed error?
> In other words we need a test which checks following thing:
> >
> > "Parallel algorithms shall not participate in overload resolution unless
> is_execution_policy_v<decay_-
> >  t<ExecutionPolicy>> is true."
> >
> > Right?
>
>
> Right.
>
> > As far as I understand we should one call pear each algorithm with
> "fake" policy for  is_execution_policy_v<fake_policy> is false and get a
> compilation error like "exclusive_scan(....).... is not found".
> >  Otherwise, test "fail". So, it is "negative" test, right?
> >  So, I have two questions:
> >
> > 1. Does LLVM test system support a negative test?
>
> Yes it does. See (for example)
> "test/std/iterators/iterator.container/empty.array.fail.cpp"
>
> > 2. If yes, to cover the all cases (to be sure that "enable_if is
> present") we have to add more 80 negative test units.
>
> Agreed.
>
>
> Repository:
>   rPSTL pstl
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D62719/new/
>
> https://reviews.llvm.org/D62719
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190605/94a455a7/attachment-0001.html>


More information about the libcxx-commits mailing list