UnitTests/FS: Add metadata tests

This commit is contained in:
Léo Lam
2019-12-29 15:42:16 +01:00
parent 142b7e048b
commit 484cfb9328
2 changed files with 26 additions and 9 deletions

View File

@ -77,6 +77,16 @@ struct Modes
{
Mode owner, group, other;
};
inline bool operator==(const Modes& lhs, const Modes& rhs)
{
const auto fields = [](const Modes& obj) { return std::tie(obj.owner, obj.group, obj.other); };
return fields(lhs) == fields(rhs);
}
inline bool operator!=(const Modes& lhs, const Modes& rhs)
{
return !(lhs == rhs);
}
struct Metadata
{