MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / rectIncludeSafeTest

Method rectIncludeSafeTest

test/util_t.cpp:94–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void UtilTest::rectIncludeSafeTest()
95{
96 QRectF rect;
97
98 // rectIncludeSafe on invalid rect
99 rect = {};
100 rectIncludeSafe(rect, QPointF{});
101 QVERIFY(rect.isValid());
102
103 rect = {};
104 rectIncludeSafe(rect, QRectF{});
105 QVERIFY(!rect.isValid());
106
107 rect = {};
108 rectIncludeSafe(rect, QRectF{ 0, 0, 1, 1});
109 QVERIFY(rect.isValid());
110
111
112 // rectIncludeSafe on valid rect
113 rect = { 0, 0, 1, 1};
114 rectIncludeSafe(rect, QPointF{});
115 QVERIFY(rect.isValid());
116
117 rect = { 0, 0, 1, 1};
118 rectIncludeSafe(rect, QRectF{});
119 QVERIFY(rect.isValid());
120
121 rect = { 0, 0, 1, 1};
122 rectIncludeSafe(rect, QRectF{ 0, 0, 1, 1});
123 QVERIFY(rect.isValid());
124
125}
126
127
128void UtilTest::pointsFormCorner_data()

Callers

nothing calls this directly

Calls 2

rectIncludeSafeFunction · 0.85
isValidMethod · 0.45

Tested by

no test coverage detected