diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 00000000..ed97d539 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/Testing/Temporary/LastTest.log b/Testing/Temporary/LastTest.log new file mode 100644 index 00000000..2726ad62 --- /dev/null +++ b/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Dec 08 19:03 EST +---------------------------------------------------------- +End testing: Dec 08 19:03 EST diff --git a/src/modules/location.cpp b/src/modules/location.cpp index 82271f5e..9a68dbf2 100644 --- a/src/modules/location.cpp +++ b/src/modules/location.cpp @@ -84,6 +84,8 @@ CountryAddressesInfo getAddresses(const Locale& locale) return palestineAddresses; case Locale::es_MX: return mexicoAddresses; + case Locale::mk_MK: + return macedoniaAddresses; default: return usaAddresses; } diff --git a/src/modules/location_data.h b/src/modules/location_data.h index 46730b0d..bb147e93 100644 --- a/src/modules/location_data.h +++ b/src/modules/location_data.h @@ -8471,6 +8471,137 @@ const CountryAddressesInfo mexicoAddresses{ {}, (mexicoStates), }; + +// North Macedonia +const auto macedoniaCities = std::to_array({ + "Berovo", + "Delčevo", + "Kočani", + "Makedonska Kamenica", + "Pehčevo", + "Probištip", + "Štip", + "Vinica", + "Kratovo", + "Kriva Palanka", + "Kumanovo", + "Bitola", + "Demir Hisar", + "Kruševo", + "Prilep", + "Resen", + "Gotovo", + "Tetovo", + "Skopje", + "Bogdanci", + "Gevgelija", + "Radoviš", + "Strumica", + "Valandovo", + "Debar", + "Kičevo", + "Makedonski Brod", + "Ohrid", + "Struga", + "Demir Kapija", + "Kavadarci", + "Negotino", + "Sveti Nikole", + "Veles", + "Dobrošte", + "Belojšte", + "Miletino", + "Raotince", + "Dračevo", + "Gostivar", + "Časka", + "Gazi Baba" +}); + + +const auto macedoniaStates = std::to_array({ + "Skopje", + "Pelagonia", + "Polog", + "Vardar", + "Eastern", + "Southeastern", + "Northeastern", + "Southwestern" +}); + + +const auto macedoniaStreetNames = std::to_array({ + "Kozle", + "Partizanski Odredi", + "Ilindenska", + "Makedonija", + "Goce Delčev", + "Marshal Tito", + "Sv. Kiril i Metodij", + "Boris Trajkovski", + "Koco Racin", + "Vladimir Komarov", + "Nikola Karev", + "Kliment Ohridski", + "Skupi", + "Mokra" +}); + + +const auto macedoniaStreetPrefixes = std::to_array({ + "ulica", + "bulevar" +}); + + +const std::string_view macedoniaZipCodeFormat{"#####"}; + + +const auto macedoniaAddressFormats = std::to_array({ + "{streetPrefix} {street} {buildingNumber} {secondaryAddress}", + "{street} {buildingNumber})" +}); + + +const auto macedoniaSecondaryAddressFormats = std::to_array({ + "Stan. #" +}); + + +const auto macedoniaBuildingNumberFormats = std::to_array({ + "#", + "##", + "###" +}); + + +const auto macedoniaStreetFormats = std::to_array({ + "{streetPrefix} {streetName}" +}); + + +const auto macedoniaCityFormats = std::to_array({ + "{cityName}" +}); + + +const CountryAddressesInfo macedoniaAddresses{ + {macedoniaZipCodeFormat}, + (macedoniaAddressFormats), + (macedoniaSecondaryAddressFormats), + (macedoniaStreetFormats), + {}, + {macedoniaStreetNames}, + (macedoniaStreetPrefixes), + (macedoniaBuildingNumberFormats), + (macedoniaCityFormats), + {}, + (macedoniaCities), + {}, + (macedoniaStates) +}; + // palestine const auto palestineCities = std::to_array( diff --git a/tests/modules/location_test.cpp b/tests/modules/location_test.cpp index 9c94d9b8..c22fc082 100644 --- a/tests/modules/location_test.cpp +++ b/tests/modules/location_test.cpp @@ -82,6 +82,8 @@ CountryAddressesInfo getAddresses(const Locale& locale) return israelAddresses; case Locale::es_MX: return mexicoAddresses; + case Locale::mk_MK: + return macedoniaAddresses; case Locale::ar_PS: return palestineAddresses; default: @@ -1202,6 +1204,24 @@ TEST_F(LocationTest, shouldGenerateMexicoStreetAddress) { return generatedStreetAddress.find(streetName) != std::string::npos; })); } +TEST_F(LocationTest, shouldGenerateMacedoniaStreet) +{ + const auto generatedStreet = street(Locale::mk_MK); + + ASSERT_TRUE(std::ranges::any_of(macedoniaStreetNames, [&generatedStreet](const std::string_view& street) + { return generatedStreet.find(street) != std::string::npos; })); +} + + +TEST_F(LocationTest, shouldGenerateMacedoniaStreetAddress) +{ + const auto generatedStreetAddress = streetAddress(Locale::mk_MK); + + ASSERT_TRUE(std::ranges::any_of(macedoniaStreetNames, [&generatedStreetAddress](const std::string_view& streetName) + { return generatedStreetAddress.find(streetName) != std::string::npos; })); +} + + TEST_F(LocationTest, shouldGeneratepalestineStreet) { const auto generatedStreet = street(Locale::ar_PS);