Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhn committed Jan 14, 2024
1 parent 8ab2959 commit 5d8b7e0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/modules/location/LocationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,20 @@ TEST_P(LocationTest, shouldGenerateSecondaryAddress)
{
const auto secondaryAddressElements = StringHelper::split(secondaryAddressFormat, " ");

const auto generatedSecondaryAddressElements = StringHelper::split(generatedSecondaryAddress, " ");

if (country == faker::AddressCountry::Finland)
{
if (generatedSecondaryAddressElements.size() == 1)
{
return generatedSecondaryAddress == secondaryAddressFormat;
}
}

const auto& secondaryAddressPrefix = secondaryAddressElements[0];

const auto& secondaryAddressNumber = secondaryAddressElements[1];

const auto generatedSecondaryAddressElements = StringHelper::split(generatedSecondaryAddress, " ");

const auto& generatedSecondaryAddressPrefix = generatedSecondaryAddressElements[0];

const auto& generatedSecondaryAddressNumber = generatedSecondaryAddressElements[1];
Expand Down

0 comments on commit 5d8b7e0

Please sign in to comment.