Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

path: Remove dead code in favor of unit tests #25334

Closed
wants to merge 1 commit into from

Conversation

nwoltman
Copy link

This PR removes dead code paths that are created by assertions that will never trigger. They may only trigger if either the splitDeviceRe or splitPathRe regular expressions or the [win32|posix]SplitPath functions are modified. If at some point they are modified (and for some reason the author doesn't update the code that uses those regexes/functions), current unit tests will catch most of the resulting errors and this PR adds extra tests to catch the remaining errors.

@jasnell
Copy link
Member

jasnell commented May 19, 2015

Builds and tests pass on macosx. LGTM except for the linting errors.

Remove dead code paths that are created by assertions that will never
trigger. They may only trigger if either the `splitDeviceRe` or
`splitPathRe` regular expressions are modified. If at some point they
are modified, current unit tests will catch most of the resulting
errors and this commit adds extra tests to catch the remaining errors.
@nwoltman
Copy link
Author

Fixed linting errors.

@nwoltman
Copy link
Author

This was landed in nodejs/node@2db57bd so this PR can probably be closed.

@jasnell
Copy link
Member

jasnell commented Aug 17, 2015

Awesome! Thanks!

@jasnell jasnell closed this Aug 17, 2015
@nwoltman nwoltman deleted the path-test branch March 3, 2016 05:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants