mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
rsx/util: Add unit tests for address ranges
This commit is contained in:
parent
1ff6bdd777
commit
79bcb7790c
3 changed files with 465 additions and 0 deletions
|
@ -529,6 +529,20 @@ namespace utils
|
|||
return !cur.valid() || cur.inside(range);
|
||||
});
|
||||
}
|
||||
|
||||
// Count valid entries
|
||||
usz valid_count() const
|
||||
{
|
||||
usz count = 0;
|
||||
for (const auto& e : data)
|
||||
{
|
||||
if (e.valid())
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue