-
Notifications
You must be signed in to change notification settings - Fork 7
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
✨ (file): Add clear file #1197
✨ (file): Add clear file #1197
Conversation
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
|
Codecov Report
@@ Coverage Diff @@
## develop #1197 +/- ##
========================================
Coverage 96.16% 96.16%
========================================
Files 146 146
Lines 3542 3548 +6
========================================
+ Hits 3406 3412 +6
Misses 136 136
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
1b92c1a
to
34ac265
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.
the File part LGTM w/ small suggestions 👍
regarding the FileManager part, I would prefer we keep it out of this PR as it's using exists
which will suffer from the same issues we previously had.
the FileManager test part is also a bit strange, I'm not sure I understand why you are testing like this.
auto initial_file_size = std::filesystem::file_size(path_A); | ||
auto initial_free_space = std::filesystem::space(path_A).free; | ||
|
||
EXPECT_NE(initial_file_size, 0); | ||
|
||
FileManagerKit::clear(path_A); | ||
|
||
auto final_file_size = std::filesystem::file_size(path_A); | ||
auto final_free_space = std::filesystem::space(path_A).free; |
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.
I'm not sure I understand why you want to test it like this.
why not just write to the file, measure the size, clear it, measure again?
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.
It's to verify that it is not just a truncation of a file: move the EOF character to the beginning of file and keep the previous data allocated but inaccessible.
34ac265
to
e71df79
Compare
Delete file content but file still exists
8598fd7
to
0f113b7
Compare
Kudos, SonarCloud Quality Gate passed! |
No description provided.