-
Notifications
You must be signed in to change notification settings - Fork 8
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
mmyster/feature/file system kit/error #537
Conversation
MMyster
commented
Mar 8, 2022
- ✨ (file_system_kit): Add 'err' function
- ✨ (file_system_kit): Add 'clearerr' function
Codecov Report
@@ Coverage Diff @@
## develop #537 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 1594 1602 +8
=========================================
+ Hits 1594 1602 +8
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
File comparision analysis report🔖 Info
Click to show memory sections
📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
File comparision analysis report🔖 Info
Click to show memory sections
📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
5db743c
to
74ef65d
Compare
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.
Je connaissais pas std::ferror
, c'est cool
peut être utiliser error
plutôt que err
je comprends pas aussi pourquoi le contenu que tu écris il génère une erreur dans le fichier?
libs/FileSystemKit/source/File.cpp
Outdated
return false; | ||
} | ||
|
||
return std::ferror(_file.get()); |
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.
là tu as un implicite cast de int vers bool. peut être qu'il faut être explicite avec un static_cast
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.
En effet, je corrigerai ça
{ | ||
auto input_data = std::to_array<uint8_t>({0x61, 0x62, 0x63, 0x64, 0x65, 0x66}); // "abcdef" | ||
|
||
file.open(tempFilename, "r"); |
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.
le test s'appelle errorWriting
et là tu read, peut être mettre dans un autre test errorReading
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.
En fait, je teste la fonction 'write' en mode 'r' et 'w'
|
||
file.write(input_data); | ||
|
||
auto error = file.err(); |
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.
pourquoi y a une erreur là?
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.
Ouverture en mode 'read' donc écriture impossible
|
||
file.write(input_data); | ||
|
||
auto error = file.err(); |
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.
pourquoi y a une erreur là?
|
||
file.write(input_data); | ||
|
||
auto error = file.err(); |
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.
pourquoi y a une erreur là?
655cf51
to
b98fdaa
Compare
b98fdaa
to
9c5e21d
Compare
Kudos, SonarCloud Quality Gate passed! |