Closed sbstnk closed 3 years ago
It would be awesome to add a testcase for this issue.
Indeed, it would be awesome to have a test case. :-)
I think merging this as a simple patch is reasonable, but I would recommend going with https://github.com/ebassi/graphene/pull/225 later. I can rebase it.
I wasn't sure about adding a test case, because due to the nature of the bug that would just be some random numbers for which it happens to fail instead of a real class of issues. But I can add the example from the bug report as a test. Can't think of a good name for such a test though.
I was thinking of turning the code I used to find these random numbers into a test that does picking for ~1000 random coordinates like it would be done in clutter/mutter. Not sure how useful such non-deterministic tests would be though.
I couldn't find a way to make a useful test with random positions, so I went with some hardcoded ones.
This includes code based on Mutter/Clutter which was written by @GeorgesStavracas. Since Mutter is GPL and graphene is MIT, are you okay with using that code under MIT @GeorgesStavracas?
I'm fine with it :slightly_smiling_face:
I think both #225 and #220 have fixed most of these issues.
Would it make sense to open a separate PR with just the test since a test was specifically requested here and the merged fix did not have one?
Yes, sure.
Fixes https://github.com/ebassi/graphene/issues/223
Proposed changes:
HAVE_ISNANF
code path to match the behavior of theHAVE_ISNANF
code path.