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

Refactor word module #610

Closed
wants to merge 3 commits into from
Closed

Conversation

ruxixa
Copy link

@ruxixa ruxixa commented May 30, 2024

Refactored the word module and modified the tests to work with it.
Reopening because I accidentally closed old one

@@ -76,6 +76,7 @@ set(FAKER_SOURCES
src/modules/videoGame/VideoGameData.cpp
src/modules/weather/Weather.cpp
src/modules/word/Word.cpp
src/modules/word/wordData.cpp
Copy link
Owner

Choose a reason for hiding this comment

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

source file name should start with upper case - WordData.cpp

* @note This function is used internally, as a helper
* and it is not intended to be used by the user.
*/
static std::vector<std::string_view> createAllWords();
Copy link
Owner

Choose a reason for hiding this comment

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

move to cpp file, it is implementation detail - should not be in API file

@@ -42,7 +42,7 @@ std::string extension(const std::string& mimeType)

std::string System::fileName(const FileOptions& options)
{
std::string baseName = Word::words();
std::string baseName = std::string(Word::words()); // Konwersja std::string_view na std::string
Copy link
Owner

Choose a reason for hiding this comment

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

remove comment

src/modules/word/wordData.h Show resolved Hide resolved
@@ -23,6 +22,7 @@

using namespace ::testing;
using namespace faker;
using namespace Words;
Copy link
Owner

Choose a reason for hiding this comment

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

delete

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.

2 participants