Module:IPA/testcases

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 ofModule:IPA/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

All tests passed. (refresh)

TextExpectedActualDiffers at
test_convert_ipa_to_xsampa:
Passed/ukrɑˈjɪnɑ//ukrA"jInA//ukrA"jInA/
Passed/ˈdɪkʃənɛɹi//"dIkS@nEr\i//"dIkS@nEr\i/
Passed/krɛ(ː)m//krE(:)m//krE(:)m/
Passed
Passed
Passed
Passed
Passed
Passed/ˈdɪkʃən(ə)ɹi//"dIkS@n(@)r\i//"dIkS@n(@)r\i/
Passed
Passed
Passed
Passed
Passed
Passed/t͡ʃeɪnd͡ʒ//t__SeInd__Z//t__SeInd__Z/
Passed/ˈdæzl̩//"d{zl=//"d{zl=/
TextExpectedActualDiffers at
test_convert_xsampa_to_ipa:
Passed/ukrA"jInA//ukrɑˈjɪnɑ//ukrɑˈjɪnɑ/
Passed/"dIkS@nEr\i//ˈdɪkʃənɛɹi//ˈdɪkʃənɛɹi/
Passed/krE(:)m//krɛ(ː)m//krɛ(ː)m/
Passed
Passed
Passed
Passed
Passed
Passed/"dIkS@n(@)r\i//ˈdɪkʃən(ə)ɹi//ˈdɪkʃən(ə)ɹi/
Passed
Passed
Passed
Passed
Passed
Passed/t__SeInd__Z//t͡ʃeɪnd͡ʒ//t͡ʃeɪnd͡ʒ/
Passed/"d{zl=//ˈdæzl̩//ˈdæzl̩/
TextExpectedActualDiffers at
test_roundtrip_ipa:
Passed/ukrɑˈjɪnɑ//ukrɑˈjɪnɑ//ukrɑˈjɪnɑ/
Passed/ˈdɪkʃənɛɹi//ˈdɪkʃənɛɹi//ˈdɪkʃənɛɹi/
Passed/krɛ(ː)m//krɛ(ː)m//krɛ(ː)m/
Passed
Passed
Passed
Passed
Passed
Passed/ˈdɪkʃən(ə)ɹi//ˈdɪkʃən(ə)ɹi//ˈdɪkʃən(ə)ɹi/
Passed
Passed
Passed
Passed
Passed
Passed/t͡ʃeɪnd͡ʒ//t͡ʃeɪnd͡ʒ//t͡ʃeɪnd͡ʒ/
Passed/ˈdæzl̩//ˈdæzl̩//ˈdæzl̩/
TextExpectedActualDiffers at
test_roundtrip_xsampa:
Passed/ukrA"jInA//ukrA"jInA//ukrA"jInA/
Passed/"dIkS@nEr\i//"dIkS@nEr\i//"dIkS@nEr\i/
Passed/krE(:)m//krE(:)m//krE(:)m/
Passed
Passed
Passed
Passed
Passed
Passed/"dIkS@n(@)r\i//"dIkS@n(@)r\i//"dIkS@n(@)r\i/
Passed
Passed
Passed
Passed
Passed
Passed/t__SeInd__Z//t__SeInd__Z//t__SeInd__Z/
Passed/"d{zl=//"d{zl=//"d{zl=/

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