- 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>
57 lines
1.2 KiB
C++
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
|