| 60 | |
| 61 | |
| 62 | void UtilTest::rectIncludeTest() |
| 63 | { |
| 64 | QRectF rect; |
| 65 | |
| 66 | // rectInclude on invalid rect |
| 67 | rect = {}; |
| 68 | rectInclude(rect, QPointF{}); |
| 69 | QVERIFY(!rect.isValid()); |
| 70 | |
| 71 | rect = {}; |
| 72 | rectInclude(rect, QRectF{}); |
| 73 | QVERIFY(!rect.isValid()); |
| 74 | |
| 75 | rect = {}; |
| 76 | rectInclude(rect, QRectF{ 0, 0, 1, 1}); |
| 77 | QVERIFY(rect.isValid()); |
| 78 | |
| 79 | |
| 80 | // rectInclude on valid rect |
| 81 | rect = { 0, 0, 1, 1}; |
| 82 | rectInclude(rect, QPointF{}); |
| 83 | QVERIFY(rect.isValid()); |
| 84 | |
| 85 | rect = { 0, 0, 1, 1}; |
| 86 | rectInclude(rect, QRectF{}); |
| 87 | QVERIFY(rect.isValid()); |
| 88 | |
| 89 | rect = { 0, 0, 1, 1}; |
| 90 | rectInclude(rect, QRectF{ 0, 0, 1, 1}); |
| 91 | QVERIFY(rect.isValid()); |
| 92 | } |
| 93 | |
| 94 | void UtilTest::rectIncludeSafeTest() |
| 95 | { |
nothing calls this directly
no test coverage detected