<div><div dir="auto">> 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.<br><br>> Agreed.<br></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 3, 2019 at 6:36 AM Marshall Clow via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mclow.lists added a comment.<br>
<br>
In D62719#1527089 <<a href="https://reviews.llvm.org/D62719#1527089" rel="noreferrer" target="_blank">https://reviews.llvm.org/D62719#1527089</a>>, @MikeDvorskiy wrote:<br>
<br>
> In D62719#1525450 <<a href="https://reviews.llvm.org/D62719#1525450" rel="noreferrer" target="_blank">https://reviews.llvm.org/D62719#1525450</a>>, @rodgert wrote:<br>
><br>
> > 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.<br>
><br>
><br>
> 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:<br>
><br>
> "Parallel algorithms shall not participate in overload resolution unless is_execution_policy_v<decay_-<br>
> t<ExecutionPolicy>> is true."<br>
><br>
> Right?<br>
<br>
<br>
Right.<br>
<br>
> 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".<br>
> Otherwise, test "fail". So, it is "negative" test, right?<br>
> So, I have two questions:<br>
> <br>
> 1. Does LLVM test system support a negative test?<br>
<br>
Yes it does. See (for example) "test/std/iterators/iterator.container/empty.array.fail.cpp"<br>
<br>
> 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.<br>
<br>
Agreed.<br>
<br>
<br>
Repository:<br>
rPSTL pstl<br>
<br>
CHANGES SINCE LAST ACTION<br>
<a href="https://reviews.llvm.org/D62719/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D62719/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D62719" rel="noreferrer" target="_blank">https://reviews.llvm.org/D62719</a><br>
<br>
<br>
<br>
</blockquote></div></div>