Skip to content

test for infinite loop in combineWays() / rewrite combineWays#96

Merged
Beakerboy merged 2 commits intoBeakerboy:mainfrom
deevroman:infinite-loop-test
Apr 29, 2025
Merged

test for infinite loop in combineWays() / rewrite combineWays#96
Beakerboy merged 2 commits intoBeakerboy:mainfrom
deevroman:infinite-loop-test

Conversation

@deevroman
Copy link
Copy Markdown
Contributor

@deevroman deevroman commented Apr 29, 2025

  1. I set a global timeout for tests. jest's built-in testTimeout doesn't work in this case.
  2. Added a test where the current implementation of combineWays() gets stuck.

Second commit: new combineWays() from #84

fix for #83

@deevroman deevroman changed the title test for infinite loop in combineWays() test for infinite loop in combineWays() / rewrite combineWays Apr 29, 2025
@Beakerboy Beakerboy merged commit 964dd63 into Beakerboy:main Apr 29, 2025
2 checks passed
@Beakerboy
Copy link
Copy Markdown
Owner

Thank you so much!

@Beakerboy
Copy link
Copy Markdown
Owner

Do you think it’s worthwhile passing on a message to the errorBox when the combineWays function has leftover unused ways after ring formation. It seems this should indicate malformed data.

@deevroman
Copy link
Copy Markdown
Contributor Author

I think so. I can't think of a case where this might be correct.

@Beakerboy
Copy link
Copy Markdown
Owner

@deevroman, I added a check to remove any self intersecting ways from the array of ways before they pass into the ring creation algorithm. Would you be able to look into inspecting completed rings, and discard if they are self intersecting?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants