Skip to content

Commit

Permalink
use separated name for video game genres
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <[email protected]>
  • Loading branch information
uilianries committed May 25, 2024
1 parent e06e5d4 commit e644ea1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/modules/videoGame/VideoGameData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3159,7 +3159,7 @@ const std::array<std::string_view, 3152> videoGameNames = {
"Æon Flux"
};

const std::array<std::string_view, 28> genres = {
const std::array<std::string_view, 28> videoGameGenres = {
"Action",
"Adventure",
"Battle royale",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/videoGame/VideoGameData.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace faker {
namespace videoGame {
extern const std::array<std::string_view, 3152> videoGameNames;
extern const std::array<std::string_view, 28> genres;
extern const std::array<std::string_view, 28> videoGameGenres;
extern const std::array<std::string_view, 9> platforms;
extern const std::array<std::string_view, 392> studioNames;
}
Expand Down
37 changes: 0 additions & 37 deletions src/modules/videoGame/data/Genres.h

This file was deleted.

2 changes: 1 addition & 1 deletion tests/modules/videoGame/VideoGameTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TEST_F(VideoGameTest, shouldGenerateGenre)
const auto generatedGenre = VideoGame::genre();

ASSERT_TRUE(
std::ranges::any_of(videoGameGenres, [generatedGenre](const std::string& genre) { return generatedGenre == genre; }));
std::ranges::any_of(videoGame::videoGameGenres, [generatedGenre](const std::string_view& genre) { return generatedGenre == genre; }));
}

TEST_F(VideoGameTest, shouldGeneratePlatform)
Expand Down

0 comments on commit e644ea1

Please sign in to comment.