Modul:h3/test

Hej, du har kommit hit för att leta efter betydelsen av ordet Modul:h3/test. I DICTIOUS hittar du inte bara alla ordboksbetydelser av ordet Modul:h3/test, utan du får också veta mer om dess etymologi, dess egenskaper och hur man säger Modul:h3/test i singular och plural. Allt du behöver veta om ordet Modul:h3/test finns här. Definitionen av ordet Modul:h3/test hjälper dig att vara mer exakt och korrekt när du talar eller skriver dina texter. Genom att känna till definitionen avModul:h3/test och andra ord berikar du ditt ordförråd och får tillgång till fler och bättre språkliga resurser.

All tests passed. (refresh)

Text Expected Actual
test1_get_long_sing:
Passed h3.getLongSing("subst") substantiv substantiv
Passed h3.getLongSing("prep") preposition preposition
Passed h3.getLongSing("Preposition") preposition preposition
Passed h3.getLongSing("Prepositioner") preposition preposition
Passed h3.getLongSing("Prepositionen") preposition preposition
Text Expected Actual
test2_get_long_sing_ucfirst:
Passed h3.getLongSingUCFirst("subst") Substantiv Substantiv
Passed h3.getLongSingUCFirst("prep") Preposition Preposition
Passed h3.getLongSingUCFirst("preposition") Preposition Preposition
Text Expected Actual
test3_get_long_plur:
Passed h3.getLongPlur("subst") substantiv substantiv
Passed h3.getLongPlur("prep") prepositioner prepositioner
Passed h3.getLongPlur("Preposition") prepositioner prepositioner
Text Expected Actual
test4_get_long_plur_ucfirst:
Passed h3.getLongPlurUCFirst("subst") Substantiv Substantiv
Passed h3.getLongPlurUCFirst("prep") Prepositioner Prepositioner
Passed h3.getLongPlurUCFirst("preposition") Prepositioner Prepositioner
Text Expected Actual
test5_get_short:
Passed h3.getShort("subst") subst subst
Passed h3.getShort("prep") prep prep
Passed h3.getShort("preposition") prep prep
Passed h3.getShort("Preposition") prep prep
Text Expected Actual
test6_get_long_det_sing:
Passed h3.getLongDetSing("subst") substantivet substantivet
Passed h3.getLongDetSing("prep") prepositionen prepositionen
Passed h3.getLongDetSing("Preposition") prepositionen prepositionen
Text Expected Actual
test7_get_long_det_sing_ucfirst:
Passed h3.getLongDetSingUCFirst("subst") Substantivet Substantivet
Passed h3.getLongDetSingUCFirst("prep") Prepositionen Prepositionen
Passed h3.getLongDetSingUCFirst("preposition") Prepositionen Prepositionen
Text Expected Actual
test8_has_h3:
Passed h3.hasH3("subst") true true
Passed h3.hasH3("Substantiv") true true
Passed h3.hasH3("xyz") false false
Text Expected Actual
test9_return_default:
Passed h3.getShort("wrongh3short")
Passed h3.getLongSing("wrongh3long")
Passed h3.getLongPlur("wrongh3long")
Passed h3.getLongDetSing("wrongh3long")
local t = require("Module:UnitTests")
local mut = require("Module:h3")

function t:test1_get_long_sing()
	self:equals('h3.getLongSing("subst")', mut.getLongSing("subst"), "substantiv")
	self:equals('h3.getLongSing("prep")', mut.getLongSing("prep"), "preposition")
	self:equals('h3.getLongSing("Preposition")', mut.getLongSing("Preposition"), "preposition")
	self:equals('h3.getLongSing("Prepositioner")', mut.getLongSing("Prepositioner"), "preposition")
	self:equals('h3.getLongSing("Prepositionen")', mut.getLongSing("Prepositionen"), "preposition")
end

function t:test2_get_long_sing_ucfirst()
	self:equals('h3.getLongSingUCFirst("subst")', mut.getLongSingUCFirst("subst"), "Substantiv")
	self:equals('h3.getLongSingUCFirst("prep")', mut.getLongSingUCFirst("prep"), "Preposition")
	self:equals('h3.getLongSingUCFirst("preposition")', mut.getLongSingUCFirst("preposition"), "Preposition")
end

function t:test3_get_long_plur()
	self:equals('h3.getLongPlur("subst")', mut.getLongPlur("subst"), "substantiv")
	self:equals('h3.getLongPlur("prep")', mut.getLongPlur("prep"), "prepositioner")
	self:equals('h3.getLongPlur("Preposition")', mut.getLongPlur("Preposition"), "prepositioner")
end

function t:test4_get_long_plur_ucfirst()
	self:equals('h3.getLongPlurUCFirst("subst")', mut.getLongPlurUCFirst("subst"), "Substantiv")
	self:equals('h3.getLongPlurUCFirst("prep")', mut.getLongPlurUCFirst("prep"), "Prepositioner")
	self:equals('h3.getLongPlurUCFirst("preposition")', mut.getLongPlurUCFirst("preposition"), "Prepositioner")
end

function t:test5_get_short()
	self:equals('h3.getShort("subst")', mut.getShort("subst"), "subst")
	self:equals('h3.getShort("prep")', mut.getShort("prep"), "prep")
	self:equals('h3.getShort("preposition")', mut.getShort("preposition"), "prep")
	self:equals('h3.getShort("Preposition")', mut.getShort("Preposition"), "prep")
end

function t:test6_get_long_det_sing()
	self:equals('h3.getLongDetSing("subst")', mut.getLongDetSing("subst"), "substantivet")
	self:equals('h3.getLongDetSing("prep")', mut.getLongDetSing("prep"), "prepositionen")
	self:equals('h3.getLongDetSing("Preposition")', mut.getLongDetSing("Preposition"), "prepositionen")
end

function t:test7_get_long_det_sing_ucfirst()
	self:equals('h3.getLongDetSingUCFirst("subst")', mut.getLongDetSingUCFirst("subst"), "Substantivet")
	self:equals('h3.getLongDetSingUCFirst("prep")', mut.getLongDetSingUCFirst("prep"), "Prepositionen")
	self:equals('h3.getLongDetSingUCFirst("preposition")', mut.getLongDetSingUCFirst("preposition"), "Prepositionen")
end

function t:test8_has_h3()
	self:equals('h3.hasH3("subst")', mut.hasH3("subst"), true)
	self:equals('h3.hasH3("Substantiv")', mut.hasH3("Substantiv"), true)
	self:equals('h3.hasH3("xyz")', mut.hasH3("xyz"), false)
end

function t:test9_return_default()
	self:equals('h3.getShort("wrongh3short")', mut.getShort("wrongh3short"), "")
	self:equals('h3.getLongSing("wrongh3long")', mut.getLongDetSing("wrongh3long"), "")
	self:equals('h3.getLongPlur("wrongh3long")', mut.getLongDetSing("wrongh3long"), "")
	self:equals('h3.getLongDetSing("wrongh3long")', mut.getLongDetSing("wrongh3long"), "")
end

return t