Module:Color/testcases
Appearance
![]() | This is the test cases page for the module Module:Color. Results of the test cases. |
local p = require('Module:UnitTests')
function p:test01_rgb()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToRgb|fefdfc}}',
'{{#invoke:Color|rgbhexToRgb|fefdfc}}'
)
end
function p:test02_hsl_black()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsl|precision=3|000}}',
'{{#invoke:Color |rgbhexToHsl|precision=3|000}}'
)
end
function p:test03_hsl_white()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsl|precision=3|FFF}}',
'{{#invoke:Color |rgbhexToHsl|precision=3|FFF}}'
)
end
function p:test04_hsl_crimson()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsl|precision=3|DC143C}}',
'{{#invoke:Color |rgbhexToHsl|precision=3|DC143C}}'
)
end
function p:test05_hsl_msgreen()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsl|precision=3|00FA9A}}',
'{{#invoke:Color |rgbhexToHsl|precision=3|00FA9A}}'
)
end
function p:test06_hsl_rblue()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsl|precision=3|4169E1}}',
'{{#invoke:Color |rgbhexToHsl|precision=3|4169E1}}'
)
end
function p:test07_hsv_black()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsv|precision=3|000}}',
'{{#invoke:Color |rgbhexToHsv|precision=3|000}}'
)
end
function p:test08_hsv_white()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsv|precision=3|FFF}}',
'{{#invoke:Color |rgbhexToHsv|precision=3|FFF}}'
)
end
function p:test09_hsv_crimson()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsv|precision=3|DC143C}}',
'{{#invoke:Color |rgbhexToHsv|precision=3|DC143C}}'
)
end
function p:test10_hsv_msgreen()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsv|precision=3|00FA9A}}',
'{{#invoke:Color |rgbhexToHsv|precision=3|00FA9A}}'
)
end
function p:test11_hsv_rblue()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToHsv|precision=3|4169E1}}',
'{{#invoke:Color |rgbhexToHsv|precision=3|4169E1}}'
)
end
function p:test12_cielch_black()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|000}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|000}}'
)
end
function p:test13_cielch_white()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|FFF}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|FFF}}'
)
end
function p:test14_cielch_red()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|F00}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|F00}}'
)
end
function p:test15_cielch_yellow()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|FF0}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|FF0}}'
)
end
function p:test16_cielch_green()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|0F0}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|0F0}}'
)
end
function p:test17_cielch_cyan()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|0FF}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|0FF}}'
)
end
function p:test18_cielch_blue()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|00F}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|00F}}'
)
end
function p:test19_cielch_magenta()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|F0F}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|F0F}}'
)
end
function p:test20_cielch_grey()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|808080}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|808080}}'
)
end
function p:test21_cielch_awhite()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|FAEBD7}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|FAEBD7}}'
)
end
function p:test22_cielch_onyx()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|353839}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|353839}}'
)
end
function p:test23_cielch_licorice()
self:preprocess_equals_preprocess(
'{{#invoke:Color/sandbox|rgbhexToCielch|precision=3|1A1110}}',
'{{#invoke:Color |rgbhexToCielch|precision=3|1A1110}}'
)
end
return p