mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

添加任务栏配置插件部分的单元测试代码 Log: Task: https://pms.uniontech.com/zentao/task-view-86362.html Change-Id: Ia3b52a70e53a01e085bbab6ae142244949758aaa
25 lines
452 B
C++
25 lines
452 B
C++
#include "module_widget.h"
|
|
|
|
#include <QWidget>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
class Test_ModuleWidget : public QObject, public ::testing::Test
|
|
{};
|
|
|
|
TEST(Test_ModuleWidget_DeathTest, updateSliderValue)
|
|
{
|
|
ModuleWidget widget;
|
|
#ifdef QT_DEBUG
|
|
EXPECT_DEBUG_DEATH({widget.updateSliderValue(-1);}, "");
|
|
#endif
|
|
}
|
|
|
|
TEST_F(Test_ModuleWidget, updateSliderValue)
|
|
{
|
|
ModuleWidget widget;
|
|
|
|
widget.updateSliderValue(0);
|
|
widget.updateSliderValue(1);
|
|
}
|