Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added continents function #984 #985

Merged
merged 19 commits into from
Nov 19, 2024

Conversation

charan-003
Copy link
Contributor

  • Added: A new continent() function to determine the continent for a given country.

  • Fallback: Implemented a fallback to return "Unknown" for unmapped countries.

  • Updates to Codebase:

  • Modified location.cpp and location_data.h to include continent-related logic.

  • Tests:

  • Added tests in location_test.cpp under the new LocationContinentTest suite:

  • shouldGenerateCorrectContinentForKnownCountry

  • shouldReturnUnknownForUnmappedCountry

  • shouldGenerateRandomContinent

tests/modules/location_test.cpp Outdated Show resolved Hide resolved
include/faker-cxx/location.h Outdated Show resolved Hide resolved
tests/modules/location_test.cpp Outdated Show resolved Hide resolved
tests/modules/location_test.cpp Outdated Show resolved Hide resolved
Copy link
Contributor Author

@charan-003 charan-003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed unused methods

tests/modules/location_test.cpp Outdated Show resolved Hide resolved
tests/modules/location_test.cpp Outdated Show resolved Hide resolved
tests/modules/location_test.cpp Outdated Show resolved Hide resolved
src/modules/location_data.h Outdated Show resolved Hide resolved
src/modules/location.cpp Outdated Show resolved Hide resolved
src/modules/location.cpp Outdated Show resolved Hide resolved
include/faker-cxx/location.h Outdated Show resolved Hide resolved
@cieslarmichal cieslarmichal linked an issue Nov 18, 2024 that may be closed by this pull request
Copy link
Contributor Author

@charan-003 charan-003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed comments and empty spaces, also added feature for random continent

include/faker-cxx/location.h Outdated Show resolved Hide resolved
src/modules/location.cpp Outdated Show resolved Hide resolved
Copy link
Contributor Author

@charan-003 charan-003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@cieslarmichal cieslarmichal merged commit f0b97e6 into cieslarmichal:main Nov 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add continent function to location module
2 participants