feat(region): add integer versions of SRgn functions

This commit is contained in:
Adam Heinermann 2025-09-13 02:24:31 -07:00 committed by fallenoak
parent 547fc6d4f0
commit a96d1270d4
5 changed files with 1033 additions and 60 deletions

View file

@ -26,6 +26,12 @@ std::ostream& operator <<(std::ostream& os, RECTF const& value) {
return os;
}
// Helpers for comparing RECTF structs
std::ostream& operator <<(std::ostream& os, RECT const& value) {
os << "{ " << value.left << ", " << value.top << ", " << value.right << ", " << value.bottom << " }";
return os;
}
template <class T>
class RECTMatcher : public Catch::MatcherBase<T> {
private:
@ -45,6 +51,10 @@ class RECTMatcher : public Catch::MatcherBase<T> {
}
};
RECTMatcher<RECTF> MatchesRect(RECTF arg) {
RECTMatcher<RECTF> MatchesRectf(RECTF arg) {
return { arg };
}
RECTMatcher<RECT> MatchesRecti(RECT arg) {
return { arg };
}