Debian Codegraph @

src/tests/imagecheckobj.cpp

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: GPL-3.0-only
4
5 #include "imagecheckobj.h"
6
7 // Sets up the test fixture.
8 void ImageCheckObj::SetUp()
9 {
10 m_pBootMaker = new BootMaker;
11 }
12
13 // Tears down the test fixture.
14 void ImageCheckObj::TearDown()
15 {
16 delete m_pBootMaker;
17 m_pBootMaker = nullptr;
18 }
19
20 TEST_F(ImageCheckObj, TestName)
21 {
22 //由于DBus的调用检测功能,该函数会失败,如果需要成功测试,需要先去掉检测功能 checkcaller
23 bool bResult = m_pBootMaker->checkfile("/home/sfs/Documents/test.iso");
24 ASSERT_EQ(bResult, true);
25 //bResult = m_pBootMaker->checkfile("/home/sfs/Documents/bad.iso");
26 //ASSERT_EQ(bResult, false);
27 }