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

Method rectIncludeTest

test/util_t.cpp:62–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62void 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
94void UtilTest::rectIncludeSafeTest()
95{

Callers

nothing calls this directly

Calls 2

rectIncludeFunction · 0.85
isValidMethod · 0.45

Tested by

no test coverage detected