Adds further migration results and moves generated tests in
This commit is contained in:
442 files changed
+17126
-246
No files matched your search
@@ -0,0 +1,52 @@
|
||||
#include "Lts/Common/LtsTimelineClassic/EventDelegate.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
class EventDelegateTest : public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
void SetUp() override {}
|
||||
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
TEST(EventDelegateTest, ConstructorCreatesDelegate)
|
||||
{
|
||||
QWidget widget;
|
||||
EventDelegate delegate(&widget);
|
||||
|
||||
EXPECT_NE(delegate.parent(), nullptr);
|
||||
}
|
||||
|
||||
TEST(EventDelegateTest, SizeHintReturnsValidSize)
|
||||
{
|
||||
QWidget widget;
|
||||
EventDelegate delegate(&widget);
|
||||
QStyleOptionViewItem option;
|
||||
QModelIndex index;
|
||||
|
||||
QSize size = delegate.sizeHint(option, index);
|
||||
|
||||
EXPECT_EQ(size.width(), 50);
|
||||
EXPECT_EQ(size.height(), 20);
|
||||
}
|
||||
|
||||
TEST(EventDelegateTest, SetKnownRangesStoresRanges)
|
||||
{
|
||||
QWidget widget;
|
||||
EventDelegate delegate(&widget);
|
||||
|
||||
QVector<Range> ranges;
|
||||
ranges.append(Range(0, 100));
|
||||
ranges.append(Range(200, 300));
|
||||
|
||||
// setKnownRanges is a public method - we can call it
|
||||
// The internal storage is private, so we just verify the call compiles and doesn't crash
|
||||
EXPECT_NO_THROW(delegate.setKnownRanges(ranges));
|
||||
}
|
||||
|
||||
} // namespace LtsTimelineClassic
|
||||
Reference in new issue
Block a user