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

Classes

struct  AudioClassifyTest
 
class  AudioTest
 
struct  SimpleDefinition
 
class  AudioBookTest
 
class  CuesheetTest
 
class  LyricsTest
 
class  CDDATest
 
class  MusicDbTest
 

Functions

 TEST_P (AudioTest, IsAudio)
 
 INSTANTIATE_TEST_SUITE_P (TestMusicFileItemClassify, AudioTest, testing::ValuesIn(audio_tests))
 
 TEST (TestMusicFileItemClassify, MusicExtensions)
 
 TEST_P (AudioBookTest, IsAudioBook)
 
 INSTANTIATE_TEST_SUITE_P (TestMusicFileItemClassify, AudioBookTest, testing::ValuesIn(audiobook_tests))
 
 TEST_P (CuesheetTest, IsCUESheet)
 
 INSTANTIATE_TEST_SUITE_P (TestMusicFileItemClassify, CuesheetTest, testing::ValuesIn(cuesheet_tests))
 
 TEST_P (LyricsTest, IsLyrics)
 
 INSTANTIATE_TEST_SUITE_P (TestMusicFileItemClassify, LyricsTest, testing::ValuesIn(lyrics_tests))
 
 TEST_P (CDDATest, IsCDDA)
 
 INSTANTIATE_TEST_SUITE_P (TestMusicFileItemClassify, CDDATest, testing::ValuesIn(cdda_tests))
 
 TEST_P (MusicDbTest, IsMusicDb)
 
 INSTANTIATE_TEST_SUITE_P (TestMusicFileItemClassify, MusicDbTest, testing::ValuesIn(musicdb_tests))
 

Variables

const auto audio_tests
 
const auto audiobook_tests
 
const auto cuesheet_tests
 
const auto lyrics_tests
 
const auto cdda_tests
 
const auto musicdb_tests
 

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P() [1/6]

INSTANTIATE_TEST_SUITE_P ( TestMusicFileItemClassify ,
AudioBookTest ,
testing::ValuesIn(audiobook_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [2/6]

INSTANTIATE_TEST_SUITE_P ( TestMusicFileItemClassify ,
AudioTest ,
testing::ValuesIn(audio_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [3/6]

INSTANTIATE_TEST_SUITE_P ( TestMusicFileItemClassify ,
CDDATest ,
testing::ValuesIn(cdda_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [4/6]

INSTANTIATE_TEST_SUITE_P ( TestMusicFileItemClassify ,
CuesheetTest ,
testing::ValuesIn(cuesheet_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [5/6]

INSTANTIATE_TEST_SUITE_P ( TestMusicFileItemClassify ,
LyricsTest ,
testing::ValuesIn(lyrics_tests)  )

◆ INSTANTIATE_TEST_SUITE_P() [6/6]

INSTANTIATE_TEST_SUITE_P ( TestMusicFileItemClassify ,
MusicDbTest ,
testing::ValuesIn(musicdb_tests)  )

◆ TEST()

TEST ( TestMusicFileItemClassify ,
MusicExtensions  )

◆ TEST_P() [1/6]

TEST_P ( AudioBookTest ,
IsAudioBook  )

◆ TEST_P() [2/6]

TEST_P ( AudioTest ,
IsAudio  )

◆ TEST_P() [3/6]

TEST_P ( CDDATest ,
IsCDDA  )

◆ TEST_P() [4/6]

TEST_P ( CuesheetTest ,
IsCUESheet  )

◆ TEST_P() [5/6]

TEST_P ( LyricsTest ,
IsLyrics  )

◆ TEST_P() [6/6]

TEST_P ( MusicDbTest ,
IsMusicDb  )

Variable Documentation

◆ audio_tests

const auto audio_tests
Initial value:
= std::array{
AudioClassifyTest{"/home/user/song.avi", true, "audio/mp3"},
AudioClassifyTest{"/home/user/song.avi", false, "", 1},
AudioClassifyTest{"/home/user/song.avi", false, "", 2},
AudioClassifyTest{"/home/user/song.avi", true, "", 3},
AudioClassifyTest{"/home/user/song.avi", false, "", 4},
AudioClassifyTest{"cdda://1"},
AudioClassifyTest{"/home/user/song.avi", true, "application/ogg"},
AudioClassifyTest{"/home/user/video.not", true, "application/mp4"},
AudioClassifyTest{"/home/user/video.not", true, "application/mxf"},
}
Definition TestMusicFileItemClassify.cpp:25

◆ audiobook_tests

const auto audiobook_tests
Initial value:
= std::array{
SimpleDefinition{"/home/user/test.m4b", false, true},
SimpleDefinition{"/home/user/test.m4b", true, true},
SimpleDefinition{"/home/user/test.mka", false, true},
SimpleDefinition{"/home/user/test.mka", true, true},
SimpleDefinition{"/home/user/test.not", false, false},
}
Definition TestMusicFileItemClassify.cpp:93

◆ cdda_tests

const auto cdda_tests
Initial value:
= std::array{
SimpleDefinition{"cdda://1", false, true},
SimpleDefinition{"cdda://1/", true, true},
SimpleDefinition{"cdda://1/", true, true},
SimpleDefinition{"/home/foo/yo.cdda", false, false},
}

◆ cuesheet_tests

const auto cuesheet_tests
Initial value:
= std::array{
SimpleDefinition{"/home/user/test.cue", false, true},
SimpleDefinition{"/home/user/test.cue/", true, false},
SimpleDefinition{"/home/user/test.foo", false, false},
}

◆ lyrics_tests

const auto lyrics_tests
Initial value:
= std::array{
SimpleDefinition{"/home/user/test.lrc", false, true},
SimpleDefinition{"/home/user/test.cdg", false, true},
SimpleDefinition{"/home/user/test.not", false, false},
SimpleDefinition{"/home/user/test.lrc/", true, false},
}

◆ musicdb_tests

const auto musicdb_tests
Initial value:
= std::array{
SimpleDefinition{"musicdb://1", false, true},
SimpleDefinition{"musicdb://1/", true, true},
SimpleDefinition{"/home/foo/musicdb/yo.mp3", false, false},
}