Skip to content

topohelper's unit tests basics

Denis Gofman requested to merge dengof_1072_ut_1 into master

The test project consists of two subfolders covering exposed namespaces: connection and geometry.

Each tested function is to be placed in a separate test case.

The currently present topohelp::connection::createConnectionPath and topohelp::geom::path functions serve as the 'entry points' and are subjects of intense changes in upcoming refactoring. However, these are not extensively covered here because everything was addressed in libveditor/tst_connectionutils.cpp and there are no extra underlying changes yet. Despite this, the QLineF-based topohelp::geom::path already exhibits peculiar behavior. The result contains duplicates and unexpected 'back-loops,' but these issues are likely resolved with topohelp::geom::simplifyPoints somewhere at runtime. What concerns me the most is that one of the last segments seems to not be connected properly:

image

This might be the result of a bug in some of the internally used functions, or it could be due to hardcoded paddings/thresholds. We'll see after covering others with unit tests.

The protohelp_tmp_test_helper.py script is just to quickly render geometries during development like in screenshot above, it is not supposed to stay here for long, so please ignore that 😄

Merge request reports