diff options
| author | Léo Lam <leo@leolam.fr> | 2019-12-29 15:42:16 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-01-25 17:53:39 +0100 |
| commit | 484cfb93288ee593d860e824ee466dc244f72ceb (patch) | |
| tree | 938b78b16a95f565f862fe9f6dddf1597910a010 /Source/Core | |
| parent | 142b7e048b5243c42cf8b24f244187cb848ea7b5 (diff) | |
UnitTests/FS: Add metadata tests
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/IOS/FS/FileSystem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/Core/IOS/FS/FileSystem.h b/Source/Core/Core/IOS/FS/FileSystem.h index 8b4b59a858..3b3c8e9ede 100644 --- a/Source/Core/Core/IOS/FS/FileSystem.h +++ b/Source/Core/Core/IOS/FS/FileSystem.h @@ -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 { |
