Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestNetworkFileItemClassify.cpp File Reference
#include "FileItem.h"
#include "URL.h"
#include "filesystem/StackDirectory.h"
#include "network/NetworkFileItemClassify.h"
#include <array>
#include <string>
#include <gtest/gtest.h>

Classes

class  InternetStreamTest
 
class  RemoteTest
 
class  StreamedFilesystemTest
 

Functions

 TEST_P (InternetStreamTest, IsInternetStream)
 
 INSTANTIATE_TEST_SUITE_P (TestNetworkFileItemClassify, InternetStreamTest, testing::ValuesIn(inetstream_tests))
 
 TEST (TestNetworkWorkFileItemClassify, InternetStreamStacks)
 
 TEST_P (RemoteTest, IsRemote)
 
 INSTANTIATE_TEST_SUITE_P (TestNetworkFileItemClassify, RemoteTest, testing::ValuesIn(remote_tests))
 
 TEST_P (StreamedFilesystemTest, IsStreamedFilesystem)
 
 INSTANTIATE_TEST_SUITE_P (TestNetworkFileItemClassify, StreamedFilesystemTest, testing::ValuesIn(streamedfs_tests))
 
 TEST (TestNetworkWorkFileItemClassify, StreamedFilesystemStacks)
 

Variables

const auto inetstream_tests
 
const auto remote_tests
 
const auto streamedfs_tests
 

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P() [1/3]

INSTANTIATE_TEST_SUITE_P ( TestNetworkFileItemClassify ,
InternetStreamTest ,
testing::ValuesIn(inetstream_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [2/3]

INSTANTIATE_TEST_SUITE_P ( TestNetworkFileItemClassify ,
RemoteTest ,
testing::ValuesIn(remote_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [3/3]

INSTANTIATE_TEST_SUITE_P ( TestNetworkFileItemClassify ,
StreamedFilesystemTest ,
testing::ValuesIn(streamedfs_tests)  )

◆ TEST() [1/2]

TEST ( TestNetworkWorkFileItemClassify ,
InternetStreamStacks  )

◆ TEST() [2/2]

TEST ( TestNetworkWorkFileItemClassify ,
StreamedFilesystemStacks  )

◆ TEST_P() [1/3]

TEST_P ( InternetStreamTest ,
IsInternetStream  )

◆ TEST_P() [2/3]

TEST_P ( RemoteTest ,
IsRemote  )

◆ TEST_P() [3/3]

TEST_P ( StreamedFilesystemTest ,
IsStreamedFilesystem  )

Variable Documentation

◆ inetstream_tests

const auto inetstream_tests

◆ remote_tests

const auto remote_tests
Initial value:
= std::array{
SimpleDefinition{"cdda://1", false, false},
SimpleDefinition{"cdda://1", true, false},
SimpleDefinition{"iso9660://some.file", false, false},
SimpleDefinition{"cdda://some.file", true, false},
SimpleDefinition{"special://home/foo.xml", false, false},
SimpleDefinition{"special://home", true, false},
SimpleDefinition{"zip://" + CURL::Encode("/home/foo/bar.zip"), true, false},
SimpleDefinition{"zip://" + CURL::Encode("https://some.where/yo.zip"), true, true},
SimpleDefinition{"addons://plugins", true, false},
SimpleDefinition{"sources://music", true, false},
SimpleDefinition{"videodb://1/2", true, false},
SimpleDefinition{"musicdb://1/2", true, false},
SimpleDefinition{"library://movies/titles", true, false},
SimpleDefinition{"plugin://plugin.video.yo", true, false},
SimpleDefinition{"androidapp://cool.app", true, false},
SimpleDefinition{"/home/foo/bar", true, false},
SimpleDefinition{"https://127.0.0.1/bar", true, false},
SimpleDefinition{"https://some.where/bar", true, true},
}
static std::string Encode(std::string_view strURLData)
Definition URL.cpp:695
Definition TestMusicFileItemClassify.cpp:93

◆ streamedfs_tests

const auto streamedfs_tests
Initial value:
= std::array{
SimpleDefinition{"/home/user/test.disc", false, false},
SimpleDefinition{"/home/user/test.disc", true, false},
SimpleDefinition{"http://some.where/foo", false, true},
SimpleDefinition{"http://some.where/foo", true, true},
SimpleDefinition{"https://some.where/foo", false, true},
SimpleDefinition{"https://some.where/foo", true, true},
SimpleDefinition{"ftp://some.where/foo", false, true},
SimpleDefinition{"ftp://some.where/foo", true, true},
SimpleDefinition{"sftp://some.where/foo", false, true},
SimpleDefinition{"sftp://some.where/foo", true, true},
SimpleDefinition{"ssh://some.where/foo", false, true},
SimpleDefinition{"ssh://some.where/foo", true, true},
SimpleDefinition{"ssh://some.where/foo", true, true},
}