Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestBcp47Formatter.cpp File Reference

Classes

struct  TestFormatting
 
class  FormatTester
 
struct  TestRecommendedCasing
 
class  RecommendedCasingTester
 
struct  TestDebugFormatting
 
class  DebugFormatTester
 

Functions

std::ostream & operator<< (std::ostream &os, const TestFormatting &rhs)
 
 TEST_P (FormatTester, FormatRaw)
 
 TEST_P (FormatTester, FormatEnglish)
 
 INSTANTIATE_TEST_SUITE_P (TestI18nBcp47Formatter, FormatTester, testing::ValuesIn(FormattingTests))
 
std::ostream & operator<< (std::ostream &os, const TestRecommendedCasing &rhs)
 
 TEST_P (RecommendedCasingTester, ParseTag)
 
 INSTANTIATE_TEST_SUITE_P (TestI18nBcp47Formatter, RecommendedCasingTester, testing::ValuesIn(RecommendedCasingTests))
 
 TEST (TestI18nBcp47Formatter, ShortestDesc)
 
std::ostream & operator<< (std::ostream &os, const TestDebugFormatting &rhs)
 
 TEST_P (DebugFormatTester, Format)
 
 INSTANTIATE_TEST_SUITE_P (TestI18nBcp47Formatter, DebugFormatTester, testing::ValuesIn(DebugFormattingTests))
 

Variables

const TestFormatting FormattingTests []
 
const TestRecommendedCasing RecommendedCasingTests []
 
const TestDebugFormatting DebugFormattingTests []
 

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P() [1/3]

INSTANTIATE_TEST_SUITE_P ( TestI18nBcp47Formatter ,
DebugFormatTester ,
testing::ValuesIn(DebugFormattingTests)  )

◆ INSTANTIATE_TEST_SUITE_P() [2/3]

INSTANTIATE_TEST_SUITE_P ( TestI18nBcp47Formatter ,
FormatTester ,
testing::ValuesIn(FormattingTests)  )

◆ INSTANTIATE_TEST_SUITE_P() [3/3]

INSTANTIATE_TEST_SUITE_P ( TestI18nBcp47Formatter ,
RecommendedCasingTester ,
testing::ValuesIn(RecommendedCasingTests)  )

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream & os,
const TestDebugFormatting & rhs )

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream & os,
const TestFormatting & rhs )

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream & os,
const TestRecommendedCasing & rhs )

◆ TEST()

TEST ( TestI18nBcp47Formatter ,
ShortestDesc  )

◆ TEST_P() [1/4]

TEST_P ( DebugFormatTester ,
Format  )

◆ TEST_P() [2/4]

TEST_P ( FormatTester ,
FormatEnglish  )

◆ TEST_P() [3/4]

TEST_P ( FormatTester ,
FormatRaw  )

◆ TEST_P() [4/4]

TEST_P ( RecommendedCasingTester ,
ParseTag  )

Variable Documentation

◆ DebugFormattingTests

const TestDebugFormatting DebugFormattingTests[]
Initial value:
= {
{"en", "BCP47 (well formed, valid) language: en, ext langs: {}, script: , region: , variants: {}, extensions: {}, private use: {}, grandfathered:"},
{"zz", "BCP47 (well formed, invalid) language: zz, ext langs: {}, script: , region: , variants: {}, extensions: {}, private use: {}, grandfathered:"},
{"zz-ext-exz-bcde-fg-abcde-0abc-e-abcd-ef-f-ef-x-a-bcd",
"BCP47 (well formed, invalid) language: zz, ext langs: {ext, exz}, script: bcde, region: fg, "
"variants: {abcde, 0abc}, extensions: {name: e values: {abcd, ef} name: f values: {ef}}, "
"private use: {a, bcd}, grandfathered:"},
{"x-a-bcd", "BCP47 (private use, valid) language: , ext langs: {}, script: , region: , variants: {}, "
"extensions: {}, private use: {a, bcd}, grandfathered:"},
{"i-ami", "BCP47 (grandfathered, valid) language: , ext langs: {}, script: , region: , variants: {}, "
"extensions: {}, private use: {}, grandfathered: i-ami"},
}

◆ FormattingTests

const TestFormatting FormattingTests[]
Initial value:
= {
{"en", "English"},
{"eng", "eng"},
{"en-AU", "English (Australia)"},
{"es-419", "Spanish (Latin America and the Caribbean)"},
{"zh-yue-Hant-HK", "Chinese (Cantonese, Han (Traditional variant), Hong Kong)"},
{"yue-Hant", "Cantonese (Han (Traditional variant))"},
{"zz-ext-exz-bcde-fg-abcde-0abc-e-abcd-ef-f-ef-x-a-bcd",
"zz (ext-exz, Bcde, FG, abcde-0abc, e-abcd-ef-f-ef, x-a-bcd)"},
{"x-a-bcd", "x-a-bcd"},
{"i-ami", "Amis"},
}

◆ RecommendedCasingTests

const TestRecommendedCasing RecommendedCasingTests[]
Initial value:
= {
{"Ab", "ab"},
{"aB", "ab"},
{"ab-ExT-eXt", "ab-ext-ext"},
{"En-Ca-X-cA", "en-CA-x-ca"},
{"eN-cA-x-cA", "en-CA-x-ca"},
{"az-lAtN-x-Latn", "az-Latn-x-latn"},
{"ab-AbCdE-bCdEfGhI", "ab-abcde-bcdefghi"},
{"Zh-GuOyU", "zh-guoyu"},
}