Skip to content

Commit

Permalink
it causes because im tired enough at work
Browse files Browse the repository at this point in the history
  • Loading branch information
yakupcemilk committed Nov 15, 2023
1 parent f8e6140 commit 684b70c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 48 deletions.
4 changes: 1 addition & 3 deletions src/modules/location/Location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "data/turkiye/TurkiyeDistricts.h"
#include "data/turkiye/TurkiyeNeighbourhoods.h"
#include "data/turkiye/TurkiyeStreetNames.h"
#include "data/turkiye/TurkiyeStreetNumberPrefix.h"
#include "data/france/FranceAddressFormat.h"
#include "data/france/FranceCities.h"
#include "data/france/FranceStreetPrefixes.h"
Expand Down Expand Up @@ -79,8 +78,7 @@ const std::map<Country, std::vector<std::string>> countryToStreetSuffixesMapping
const std::map<Country, std::vector<std::string>> countryToStreetPrefixesMapping{
{Country::Russia, russiaStreetPrefixes},
{Country::Poland, polandStreetPrefixes},
{Country::France, franceStreetPrefixes},
{Country::Turkiye, turkiyeStreetNumberPrefix},};
{Country::France, franceStreetPrefixes},};
}

std::string Location::country()
Expand Down
22 changes: 0 additions & 22 deletions src/modules/location/LocationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "data/turkiye/TurkiyeDistricts.h"
#include "data/turkiye/TurkiyeNeighbourhoods.h"
#include "data/turkiye/TurkiyeStreetNames.h"
#include "data/turkiye/TurkiyeStreetNumberPrefix.h"
#include "data/france/FranceCities.h"
#include "data/france/FranceStreetPrefixes.h"
#include "data/france/FranceStreetSuffixes.h"
Expand Down Expand Up @@ -334,27 +333,6 @@ TEST_F(LocationTest, shouldGenerateTurkiyeBuildingNumber)
ASSERT_TRUE(checkIfAllCharactersAreNumeric(generatedBuildingNumber));
}

TEST(FakerTest, TurkiyeStreetNumberTest)
{
for (int i = 0; i < 1000; ++i)
{
std::string streetNumber = faker::turkiyeStreetNumber();
bool isValidPrefix = false;
for (const std::string &prefix : faker::turkiyeStreetNumberPrefix)
{
if (streetNumber.find(prefix) == 0)
{
isValidPrefix = true;
break;
}
}
EXPECT_TRUE(isValidPrefix);
int number = std::stoi(streetNumber.substr(2));
EXPECT_GE(number, 1);
EXPECT_LE(number, 999);
}
}

TEST_F(LocationTest, shouldGenerateTurkiyeStreetAddress)
{
const auto generatedStreetAddress = Location::streetAddress(Country::Turkiye);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/location/data/turkiye/TurkiyeAddressFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ const std::vector<std::string> turkiyeBuildingNumberFormats = {"##","/","###"};

const std::string turkiyeZipCodeFormat = "#####";

const std::vector<std::string> turkiyeStreetFormats = {"{streetNumberPrefix} {streetName}" };
const std::vector<std::string> turkiyeStreetFormats = {"{streetName}"};

}
22 changes: 0 additions & 22 deletions src/modules/location/data/turkiye/TurkiyeStreetNumberPrefix.h

This file was deleted.

0 comments on commit 684b70c

Please sign in to comment.