Skip to content

[Helper] FileSystem: add more unittests#6095

Open
fredroy wants to merge 2 commits intosofa-framework:masterfrom
fredroy:add_filesystem_unittests
Open

[Helper] FileSystem: add more unittests#6095
fredroy wants to merge 2 commits intosofa-framework:masterfrom
fredroy:add_filesystem_unittests

Conversation

@fredroy
Copy link
Copy Markdown
Contributor

@fredroy fredroy commented Apr 24, 2026

Should test everything except openFileWithDefaultApplication


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: test PR adding test(s) in SOFA pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI labels Apr 24, 2026
The Win32 listDirectory was returning false (no error) when FindFirstFile failed with INVALID_HANDLE_VALUE. This is inconsistent with the Unix codepath (which returns true on opendir failure) and with the documented convention
  (@return true on error). As a result, findFiles never saw the error and returned 0 instead of -1 on Windows.
TEST(FileSystemTest, removeExtraBackSlashes)
{
EXPECT_EQ("", FileSystem::removeExtraBackSlashes(""));
EXPECT_EQ("\\", FileSystem::removeExtraBackSlashes("\\"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we have \ ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't get what is expected here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: status to review To notify reviewers to review this pull-request pr: test PR adding test(s) in SOFA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants