-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat: added continents function #984 #985
Conversation
added data for continents
added module for continents
Update location.h
Update location.cpp
Update location_data.h
Update location_data.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed unused methods
There was a problem hiding this 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
added comment africa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
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