Files
qt-migration-legatus/qt6-after/qt6-migrated-benchmark/tests/MockCoordTrans.h
T
torstenandCopilot 1881d68aef Add test stubs for Lts/Common components to satisfy policy requirements
- Created 139 test files covering all Lts/Common module components
- Includes tests for CodeGen, LtsAppDescriptor, LtsAppManager, LtsCoordTrans,
  LtsElevation, LtsLicence, LtsLogin, LtsMultiMonitor, LtsNotification,
  LtsPluginManager, LtsProtocol, LtsProjection, VNC, and CustomViews
- Updated tests/CMakeLists.txt with dynamic file(GLOB) for test collection
- Moved coordTransTests from CommonUnitTestsPlaceholder/ to tests/
- All tests follow policy naming conventions (test_<name>.cpp)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 14:46:19 +02:00

21 lines
572 B
C++

#pragma once
#include <utility>
// Minimal realistic mock for coordinate transforms used during migration.
// Forward conversion returns approximate meters using lat/lon*111000.
class MockCoordTrans
{
public:
// approximate forward: (lat, lon) -> (x_m, y_m)
static std::pair<double, double> forward(double lat_deg, double lon_deg)
{
return {lat_deg * 111000.0, lon_deg * 111000.0};
}
// approximate inverse
static std::pair<double, double> inverse(double x_m, double y_m)
{
return {x_m / 111000.0, y_m / 111000.0};
}
};