Clean up test cases for value types
Allocating those value types via operator new and reusing a member
variable just makes the code strange, and possibly leaking if a test
macro returns early. Just instantiate the test objects in each member
function.
Remove init/cleanup functions that now don't do anything anymore, and
the "destructor" test that doesn't test anything that the other tests
don't already anyway. Also, trust that QList::operator== does the right
thing.
Pick-to: 6.2
Task-number: QTBUG-105206
Change-Id: I1ac5e76b2338e446db30528d8f41c9a6fe55df57
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| commit | 9bd548e0b6f19695cbfd883b42f3382247159181 |
| parent | 09a29d2cb25c48c6ac3d34a1ffd0dff976c5fcc0 |
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> |
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> |
| commit time | Wed, 27 Jul 2022 09:10:29 +0200 |
- M tests/auto/qgeomaneuver/tst_qgeomaneuver.cpp
- M tests/auto/qgeomaneuver/tst_qgeomaneuver.h
- M tests/auto/qgeoroute/tst_qgeoroute.cpp
- M tests/auto/qgeoroute/tst_qgeoroute.h
- M tests/auto/qgeorouterequest/tst_qgeorouterequest.cpp
- M tests/auto/qgeorouterequest/tst_qgeorouterequest.h
- M tests/auto/qgeoroutesegment/tst_qgeoroutesegment.cpp
- M tests/auto/qgeoroutesegment/tst_qgeoroutesegment.h