2023-02-16 13:51:55 +08:00
|
|
|
// Copyright (C) 2018 ~ 2020 Uniontech Technology Co., Ltd.
|
|
|
|
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
2022-09-06 11:36:55 +08:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
2021-03-05 14:41:04 +08:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QTest>
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
#include "placeholderitem.h"
|
|
|
|
|
|
|
|
class Test_PlaceholderItem : public ::testing::Test
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void SetUp() override;
|
|
|
|
virtual void TearDown() override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
PlaceholderItem *placeholderitem = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
void Test_PlaceholderItem::SetUp()
|
|
|
|
{
|
|
|
|
placeholderitem = new PlaceholderItem();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Test_PlaceholderItem::TearDown()
|
|
|
|
{
|
|
|
|
delete placeholderitem;
|
|
|
|
placeholderitem = nullptr;
|
|
|
|
}
|
|
|
|
|
2021-03-10 10:05:23 +08:00
|
|
|
TEST_F(Test_PlaceholderItem, placeholder_test)
|
2021-03-05 14:41:04 +08:00
|
|
|
{
|
|
|
|
QCOMPARE(placeholderitem->itemType(), PlaceholderItem::Placeholder);
|
|
|
|
}
|