44 lines
974 B
C++
44 lines
974 B
C++
#include "Lts/Common/LtsTimelineClassic/Item.h"
|
|
|
|
#include <QtWidgets/QWidget>
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace LtsTimelineClassic
|
|
{
|
|
|
|
class ItemTest : public ::testing::Test
|
|
{
|
|
protected:
|
|
void SetUp() override {}
|
|
|
|
void TearDown() override {}
|
|
};
|
|
|
|
TEST(ItemTest, HeaderCompilesAndLinks)
|
|
{
|
|
// Verify header compiles without errors
|
|
EXPECT_TRUE(true);
|
|
}
|
|
|
|
TEST(ItemTest, CanInstantiateItem)
|
|
{
|
|
// Basic instantiation test
|
|
Item item(QStringLiteral("TestItem"), QStringLiteral("test-id"));
|
|
EXPECT_EQ(item.getName(), QStringLiteral("TestItem"));
|
|
EXPECT_EQ(item.getIdentifier(), QStringLiteral("test-id"));
|
|
}
|
|
|
|
TEST(ItemTest, ItemHasValidState)
|
|
{
|
|
Item parent(QStringLiteral("Parent"));
|
|
Item child(QStringLiteral("Child"));
|
|
|
|
// Test parent-child relationship
|
|
child.setParent(&parent);
|
|
EXPECT_EQ(child.getParent(), &parent);
|
|
|
|
// Test child count
|
|
EXPECT_EQ(parent.childCount(), 0);
|
|
}
|
|
|
|
} // namespace LtsTimelineClassic
|