Hello, you have come here looking for the meaning of the word
Module:IPA/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word
Module:IPA/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say
Module:IPA/testcases in singular and plural. Everything you need to know about the word
Module:IPA/testcases you have here. The definition of the word
Module:IPA/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition of
Module:IPA/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
local tests = require('Module:UnitTests')
local m_IPA = require('Module:IPA/X-SAMPA')
local testcases = {
-- = IPA ;
-- en: ]
= '/ˈdɪkʃən(ə)ɹi/' ;
= '/ˈdɪkʃənɛɹi/' ;
-- en: ]
' ] = '' ;
-- en: ]
' ] = '' ;
-- en: ]
= '/ˈdæzl̩/' ;
--]
= '/t͡ʃeInd͡ʒ/' ; ]=]
-- en: ]
= '/t͡ʃeɪnd͡ʒ/' ;
-- uk: ]
= '/ukrɑˈjɪnɑ/' ;
-- fa: ]
' ] = '' ;
' ] = '' ;
' ] = '' ;
' ] = '' ;
-- cmn: ]
' ] = '' ;
-- yue: ]
' ] = '' ;
-- ga: ], ]
' ] = '' ;
' ] = '' ;
-- nl: ]
= '/krɛ(ː)m/' ;
}
local function format_ipa(ipa)
return '<span class="IPA" lang="">' .. ipa .. '</span>'
end
local function format_xsampa(xsampa)
return '<code>' .. xsampa .. '</code>'
end
function tests:test_convert_xsampa_to_ipa()
for xsampa, ipa in pairs(testcases) do
self:equals(
format_xsampa(xsampa),
m_IPA.XSAMPA_to_IPA(xsampa),
ipa,
{ display = format_ipa }
)
end
end
function tests:test_convert_ipa_to_xsampa()
for xsampa, ipa in pairs(testcases) do
self:equals(
format_ipa(ipa),
format_xsampa(m_IPA.IPA_to_XSAMPA(ipa)),
format_xsampa(xsampa),
{ display = format_ipa }
)
end
end
function tests:test_roundtrip_ipa()
for xsampa, ipa in pairs(testcases) do
self:equals(
format_ipa(ipa),
m_IPA.XSAMPA_to_IPA(m_IPA.IPA_to_XSAMPA(ipa)),
ipa,
{ display = format_ipa }
)
end
end
function tests:test_roundtrip_xsampa()
for xsampa, ipa in pairs(testcases) do
self:equals(
format_xsampa(xsampa),
m_IPA.IPA_to_XSAMPA(m_IPA.XSAMPA_to_IPA(xsampa)),
xsampa,
{ display = format_xsampa }
)
end
end
return tests