Module:Coordinates/testcases
Appearance
![]() | This is the test cases page for the module Module:Coordinates. Results of the test cases. |
-- Unit tests for [[Module:Coordinates]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_coord()
self:preprocess_equals_preprocess_many('{{#invoke:Coordinates|coord|', '}}',
'{{coord|', '}}', {
{'57|18|22|N|4|27|32|W', '5'},
{'44.112|N|87.913|W', '3'},
{'44.112|-87.913', '0'},
{'44.117|-87.913|dim:30_region:US-WI_type:landmark|name=Klann Road', '0'},
{'10.2|-20.3|display=inline', '3'},
{'10.2|-20.3', '5'},
{'44.4|-111.1|type:city_region:US', '5'},
{'51.01234|-1.56789|type:landmark_region:GB', '5'},
{'-35.5|150.1|type:landmark_region:AU', '5'},
{'12|34|12|N|45|33|45|W', '5'},
{'43.651234|-79.383333', '5'},
{'43.65|-79.38', '5'},
{'43.6500|-79.3800', '5'},
{'43.651234|N|79.383333|W', '5'},
{'43|29|N|79|23|W', '5'},
{'43|29|4|N|79|23|0|W', '5'},
{'43|29|4.5|N|79|23|0.5|W', '5'},
{'55.752222|N|37.615556|E', '5'},
{'55.752222|N|37.615556|E|format=dms', '5'},
{'39.098095|-94.587307|format=dms', '5'},
{'55.752222|N|37.615556|E|format=dec|name=Moscow', '5'},
{'33|55|S|18|25|E', '5'},
{'35|00|N|105|00|E', '5'},
{'22|54|30|S|43|14|37|W', '5'},
{'22|S|43|W', '5'},
{'52|28|59|N|1|53|37|W|display=inline,title|region:GB_type:city', '5'},
{'46|43|N|7|58|E|type:mountain', '5'},
{'51.500611|N|0.124611|W|scale:1000', '5'},
{'51.500611|N|0.124611|W|scale:10000', '5'},
{'51.500611|N|0.124611|W|scale:100000', '5'},
{'51.500611|N|0.124611|W|scale:1000000', '5'},
{'0|N|90|W|dim:10000000', '5'},
{'40.5|-82.5|dim:400000', '5'},
{'51.033|13.73|dim:20000', '5'},
{'40.6892|-74.0445|dim:100', '5'},
{'45.516194|-122.673226|dim:0.6', '5'},
{'46.9524|N|7.4396|E|region:CH', '5'},
{'52.5164|N|13.3775|E|region:DE-BE', '5'},
{'0|40|26.69|N|23|28|22.69|E|globe:moon', '5'},
{'48.269|N|225.990|W|globe:mars', '5'},
{'7.5|S|303|E|globe:venus', '5'},
{'8|N|190.5|W|globe:mercury', '5'},
{'52.5164|N|13.3775|E|region:DE-BE', '5'},
})
end
return p