Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestVideoFileItemClassify.cpp File Reference
#include "FileItem.h"
#include "ServiceBroker.h"
#include "filesystem/Directory.h"
#include "filesystem/File.h"
#include "games/tags/GameInfoTag.h"
#include "music/tags/MusicInfoTag.h"
#include "pictures/PictureInfoTag.h"
#include "test/TestUtils.h"
#include "utils/FileExtensionProvider.h"
#include "utils/FileUtils.h"
#include "utils/URIUtils.h"
#include "video/VideoFileItemClassify.h"
#include "video/VideoInfoTag.h"
#include <array>
#include <gtest/gtest.h>

Classes

struct  StubDefinition
 
class  DiscStubTest
 
struct  VideoClassifyTest
 
class  VideoTest
 

Functions

 TEST_P (DiscStubTest, IsDiscStub)
 
 INSTANTIATE_TEST_SUITE_P (TestVideoFileItemClassify, DiscStubTest, testing::ValuesIn(discstub_tests))
 
 TEST_P (VideoTest, IsVideo)
 
 INSTANTIATE_TEST_SUITE_P (TestVideoFileItemClassify, VideoTest, testing::ValuesIn(video_tests))
 
 TEST (TestVideoFileItemClassify, VideoExtensions)
 
 TEST (TestVideoFileItemClassify, IsBDFile)
 
 TEST (TestVideoFileItemClassify, IsDVDFile)
 
 TEST (TestVideoFileItemClassify, IsProtectedBlurayDisc)
 
 TEST (TestVideoFileItemClassify, IsSubtitle)
 
 TEST (TestVideoFileItemClassify, IsVideoAssetsFile)
 
 TEST (TestVideoFileItemClassify, IsVideoDb)
 
 TEST (TestVideoFileItemClassify, IsVideoExtrasFolder)
 

Variables

const auto discstub_tests
 
const auto video_tests
 

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P() [1/2]

INSTANTIATE_TEST_SUITE_P ( TestVideoFileItemClassify ,
DiscStubTest ,
testing::ValuesIn(discstub_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [2/2]

INSTANTIATE_TEST_SUITE_P ( TestVideoFileItemClassify ,
VideoTest ,
testing::ValuesIn(video_tests)  )

◆ TEST() [1/8]

TEST ( TestVideoFileItemClassify ,
IsBDFile  )

◆ TEST() [2/8]

TEST ( TestVideoFileItemClassify ,
IsDVDFile  )

◆ TEST() [3/8]

TEST ( TestVideoFileItemClassify ,
IsProtectedBlurayDisc  )

◆ TEST() [4/8]

TEST ( TestVideoFileItemClassify ,
IsSubtitle  )

◆ TEST() [5/8]

TEST ( TestVideoFileItemClassify ,
IsVideoAssetsFile  )

◆ TEST() [6/8]

TEST ( TestVideoFileItemClassify ,
IsVideoDb  )

◆ TEST() [7/8]

TEST ( TestVideoFileItemClassify ,
IsVideoExtrasFolder  )

◆ TEST() [8/8]

TEST ( TestVideoFileItemClassify ,
VideoExtensions  )

◆ TEST_P() [1/2]

TEST_P ( DiscStubTest ,
IsDiscStub  )

◆ TEST_P() [2/2]

TEST_P ( VideoTest ,
IsVideo  )

Variable Documentation

◆ discstub_tests

const auto discstub_tests
Initial value:
= std::array{
StubDefinition{"/home/user/test.disc"},
StubDefinition{"videodb://foo/bar", true, "/home/user/test.disc"},
StubDefinition{"videodb://foo/bar", false, "/home/user/test.disc", true},
StubDefinition{"/home/user/test.avi", false},
}
Definition TestVideoFileItemClassify.cpp:30

◆ video_tests

const auto video_tests
Initial value:
= std::array{
VideoClassifyTest{"/home/user/video.avi", true, "video/avi"},
VideoClassifyTest{"/home/user/video.avi", true, "", 1},
VideoClassifyTest{"/home/user/video.gam", false, "", 2},
VideoClassifyTest{"/home/user/video.mus", false, "", 3},
VideoClassifyTest{"/home/user/video.pic", false, "", 4},
VideoClassifyTest{"pvr://recordings/tv/1", true},
VideoClassifyTest{"pvr://123", false},
VideoClassifyTest{"dvd://VIDEO_TS/video_ts.ifo", true},
VideoClassifyTest{"dvd://1", true},
VideoClassifyTest{"/home/user/video.not", true, "application/ogg"},
VideoClassifyTest{"/home/user/video.not", true, "application/mp4"},
VideoClassifyTest{"/home/user/video.not", true, "application/mxf"},
}
Definition TestVideoFileItemClassify.cpp:71