pmt: Improve libpartition_map and tests

- Change doFor*** function return types as bool.
 - Add catching of doFor*** function test results.
 - Use std::ios_base_failure for catch std::fstream errors on tests
This commit is contained in:
2025-09-01 01:35:45 +03:00
parent e7baf4f5bc
commit 0832b57828
3 changed files with 40 additions and 14 deletions

View File

@@ -255,25 +255,25 @@ public:
/**
* Do input function (lambda) for all partitions.
*/
void doForAllPartitions(
bool doForAllPartitions(
const std::function<bool(std::string, BasicInf)> &func) const;
/**
* Do input function (lambda) for physical partitions.
*/
void doForPhysicalPartitions(
bool doForPhysicalPartitions(
const std::function<bool(std::string, BasicInf)> &func) const;
/**
* Do input function (lambda) for logical partitions.
*/
void doForLogicalPartitions(
bool doForLogicalPartitions(
const std::function<bool(std::string, BasicInf)> &func) const;
/**
* Do input function (lambda) for input partition list.
*/
void doForPartitionList(
bool doForPartitionList(
const std::vector<std::string> &partitions,
const std::function<bool(std::string, BasicInf)> &func) const;