Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestVideoUtils.cpp File Reference
#include "FileItem.h"
#include "URL.h"
#include "Util.h"
#include "filesystem/Directory.h"
#include "platform/Filesystem.h"
#include "utils/FileUtils.h"
#include "utils/URIUtils.h"
#include "video/VideoUtils.h"
#include <array>
#include <fstream>
#include <gtest/gtest.h>

Functions

 TEST_P (OpticalMediaPathTest, GetOpticalMediaPath)
 
 INSTANTIATE_TEST_SUITE_P (TestVideoUtils, OpticalMediaPathTest, testing::ValuesIn(mediapath_tests))
 
 TEST_P (TrailerTest, FindTrailer)
 
 INSTANTIATE_TEST_SUITE_P (TestVideoUtils, TrailerTest, testing::ValuesIn(trailer_tests))
 

Variables

const auto mediapath_tests
 
const auto trailer_tests
 

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P() [1/2]

INSTANTIATE_TEST_SUITE_P ( TestVideoUtils ,
OpticalMediaPathTest ,
testing::ValuesIn(mediapath_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [2/2]

INSTANTIATE_TEST_SUITE_P ( TestVideoUtils ,
TrailerTest ,
testing::ValuesIn(trailer_tests)  )

◆ TEST_P() [1/2]

TEST_P ( OpticalMediaPathTest ,
GetOpticalMediaPath  )

◆ TEST_P() [2/2]

TEST_P ( TrailerTest ,
FindTrailer  )

Variable Documentation

◆ mediapath_tests

const auto mediapath_tests
Initial value:
= std::array{
OptDef{"VIDEO_TS.IFO", true}, OptDef{"VIDEO_TS/VIDEO_TS.IFO", true},
OptDef{"some.file", false},
}

◆ trailer_tests

const auto trailer_tests
Initial value:
= std::array{
TrailerDef{"https://some.where/foo", ""},
TrailerDef{"upnp://1/2/3", ""},
TrailerDef{"bluray://1", ""},
TrailerDef{"pvr://foobar.pvr", ""},
TrailerDef{"plugin://plugin.video.foo/foo?param=1", ""},
TrailerDef{"dvd://1", ""},
TrailerDef{"stack://#DIRECTORY#foo-cd1.avi , #DIRECTORY#foo-cd2.avi", "foo-trailer.mkv"},
TrailerDef{"stack://#DIRECTORY#foo-cd1.avi , #DIRECTORY#foo-cd2.avi", "foo-cd1-trailer.avi"},
TrailerDef{"stack://#DIRECTORY#foo-cd1.avi , #DIRECTORY#foo-cd2.avi", "movie-trailer.mp4"},
TrailerDef{"zip://#URLENCODED_DIRECTORY#bar.zip/bar.avi", "bar-trailer.mov"},
TrailerDef{"zip://#URLENCODED_DIRECTORY#bar.zip/bar.mkv", "movie-trailer.ogm"},
TrailerDef{"#DIRECTORY#bar.mkv", "bar-trailer.mkv"},
TrailerDef{"#DIRECTORY#bar.mkv", "movie-trailer.avi"},
}