Skip to content

Commit d254e62

Browse files
committed
Put the new tests in their own nested mod
The module is in the same file, nested inside the `tests` module written there (which this test code had resided directly inside). It is currently named `loc`. This allows the repeated `#[cfg(windows)]` to be eliminated, allows the imports to be presented readably and to be grouped without `cargo fmt` undoing the grouping, and makes clear that these tests are all related to each other more than to the preexsting tests. But I am not sure if this is the best approach to organizing them. Maybe the test code for `locations_under_program_files`, which is a helper function meant to be used only in this module and only to define `ALTERNATIVE_LOCATIONS`, could remain in this file, while the other tests of `ALTERNATIVE_LOCATIONS` could be moved to another file. `ALTERNATIVE_LOCATIONS` has `pub(super)` visibility, so it's not part of the interface of `gix_path::env`, but it could perhaps have tests in another file directly or indirectly inside `gix-path/src/env`.
1 parent e990bcd commit d254e62

File tree

1 file changed

+311
-321
lines changed

1 file changed

+311
-321
lines changed

0 commit comments

Comments
 (0)