mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
feat(region): add integer versions of SRgn functions
This commit is contained in:
parent
547fc6d4f0
commit
a96d1270d4
5 changed files with 1033 additions and 60 deletions
|
|
@ -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 };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue