| 3 | #include <execution> |
| 4 | #include <cassert> |
| 5 | bool FilesystemApiTest::Run(std::vector<TestOperation> const& paths) |
| 6 | { |
| 7 | try |
| 8 | { |
| 9 | std::for_each( |
| 10 | std::execution::par_unseq, |
| 11 | std::begin(paths), |
| 12 | std::end(paths), |
| 13 | [](TestOperation const& test) { |
| 14 | switch (test.operation) |
| 15 | { |
| 16 | case TestOperation::Operation::Copy: |
| 17 | std::filesystem::copy(test.source, test.destination, std::filesystem::copy_options::recursive | std::filesystem::copy_options::overwrite_existing); |
| 18 | break; |
| 19 | case TestOperation::Operation::Move: |
| 20 | std::filesystem::rename(test.source, test.destination); |
| 21 | break; |
| 22 | default: |
| 23 | assert(false); |
| 24 | } |
| 25 | } |
| 26 | ); |
| 27 | return true; |
| 28 | } |
| 29 | catch (...) |
| 30 | { |
| 31 | return false; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | std::string FilesystemApiTest::GetName() const |
| 36 | { |
nothing calls this directly
no outgoing calls
no test coverage detected