MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/platform/platform_tests/utm_mgrs_utils_tests.cpp:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace utm_mgrs_utils;
8
9UNIT_TEST(FormatUTM)
10{
11 TEST_EQUAL(FormatUTM(42.0, -93.0), "15T 500000 4649776", ());
12 TEST_EQUAL(FormatUTM(31.77597, 35.23406), "36R 711554 3517777", ());
13 TEST_EQUAL(FormatUTM(-34.81449, -58.54016), "21H 359135 6146448", ());
14 TEST_EQUAL(FormatUTM(36.2361322, -115.0820944), "11S 672349 4011845", ());
15
16 TEST_EQUAL(FormatUTM(50.77535, 6.08389), "32U 294409 5628898", ());
17 TEST_EQUAL(FormatUTM(40.71435, -74.00597), "18T 583960 4507523", ());
18 TEST_EQUAL(FormatUTM(-41.28646, 174.77624), "60G 313784 5427057", ());
19 TEST_EQUAL(FormatUTM(-33.92487, 18.42406), "34H 261878 6243186", ());
20 TEST_EQUAL(FormatUTM(-32.89018, -68.84405), "19H 514586 6360877", ());
21 TEST_EQUAL(FormatUTM(64.83778, -147.71639), "6W 466013 7190568", ());
22 TEST_EQUAL(FormatUTM(56.79680, -5.00601), "30V 377486 6296562", ());
23 TEST_EQUAL(FormatUTM(84, -5.00601), "30X 476594 9328501", ());
24
25 TEST_EQUAL(FormatUTM(84.644103, 3.000009), "", ()); // Latitude limit exceeded.
26 TEST_EQUAL(FormatUTM(12.016469, 188.0), "", ());
27}
28
29UNIT_TEST(FormatMGRS)
30{

Callers

nothing calls this directly

Calls 2

FormatUTMFunction · 0.85
FormatMGRSFunction · 0.85

Tested by

no test coverage detected