Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/tests/test_timelineheaderview.cpp
T
torsten 950d669538 Qt6 Migration: BUILD_RTI guards und CMake fixes
- BUILD_RTI conditional compilation für RTI Connext DDS dependencies
- Namespace fixes in core_dtc.h (Core:: → DDS::Core::)
- CMakeLists.txt: BUILD_RTI option und conditional dependencies
- Handler minelayer: namespace closing mit BUILD_RTI guard
- Build erfolgreich mit BUILD_RTI=OFF validiert

Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
2026-08-21 18:37:18 +02:00

57 lines
1.2 KiB
C++

#include "Lts/Common/LtsTimelineClassic/TimelineHeaderView.h"
#include <QApplication>
#include <gtest/gtest.h>
namespace LtsTimelineClassic
{
class TimelineHeaderViewTest : public ::testing::Test
{
protected:
void SetUp() override
{
static int argc = 1;
static char* argv[] = {const_cast<char*>("test")};
if (!qApp)
{
m_app = std::make_unique<QApplication>(argc, argv);
}
}
void TearDown() override
{
m_app.reset();
}
private:
std::unique_ptr<QApplication> m_app;
};
TEST(TimelineHeaderViewTest, ConstructorCreatesValidHeader)
{
QWidget parent;
TimelineHeaderView header(&parent);
EXPECT_NE(header.count(), -1);
EXPECT_TRUE(header.stretchLastSection());
}
TEST(TimelineHeaderViewTest, SetPosMarkTimeUpdatesValue)
{
QWidget parent;
TimelineHeaderView header(&parent);
EXPECT_NO_THROW(header.setPosMarkTime(1000));
EXPECT_NO_THROW(header.setPosMarkTime(5000));
}
TEST(TimelineHeaderViewTest, SetLiveTimeUpdatesValue)
{
QWidget parent;
TimelineHeaderView header(&parent);
EXPECT_NO_THROW(header.setLiveTime(1000));
EXPECT_NO_THROW(header.setLiveTime(5000));
}
} // namespace LtsTimelineClassic