MCPcopy Create free account
hub / github.com/Tencent/libpag / PAG_TEST

Function PAG_TEST

test/src/PAGFileTest.cpp:32–49  ·  view source on GitHub ↗

* 用例描述: PAGFile基础信息获取 */

Source from the content-addressed store, hash-verified

30 * 用例描述: PAGFile基础信息获取
31 */
32PAG_TEST(PAGFileTest, TestPAGFileBase) {
33 PAG_SETUP(TestPAGSurface, TestPAGPlayer, TestPAGFile);
34 ASSERT_NE(TestPAGFile, nullptr);
35 auto TestFile = TestPAGFile->getFile();
36 ASSERT_NE(TestFile, nullptr);
37
38 //基本信息校验
39 ASSERT_EQ(TestFile->duration(), 250);
40 ASSERT_EQ(TestFile->frameRate(), 25);
41 Color bgColor = {171, 161, 161};
42 ASSERT_TRUE(TestFile->backgroundColor() == bgColor);
43 ASSERT_EQ(TestFile->width(), 720);
44 ASSERT_EQ(TestFile->height(), 1080);
45 ASSERT_EQ(TestFile->tagLevel(), 53);
46 ASSERT_EQ(TestFile->numLayers(), 6);
47 ASSERT_EQ(TestFile->numTexts(), 2);
48 ASSERT_EQ(TestFile->numImages(), 2);
49}
50
51/**
52 * 用例描述: PAGFile getImageAt接口校验

Callers

nothing calls this directly

Calls 15

FromPathFunction · 0.85
LoadPAGFileFunction · 0.85
FrameToTimeFunction · 0.85
getFileMethod · 0.80
backgroundColorMethod · 0.80
numLayersMethod · 0.80
getImageAtMethod · 0.80
sizeMethod · 0.80
getEditableIndexMethod · 0.80
getTextAtMethod · 0.80
getRootLayerMethod · 0.80
MakeFunction · 0.50

Tested by

no test coverage detected