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

Mikhail Dvorskiy via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 3 01:48:09 PDT 2019


MikeDvorskiy added a comment.

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?

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?
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.


Repository:
  rPSTL pstl

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62719/new/

https://reviews.llvm.org/D62719





More information about the libcxx-commits mailing list