cppyy icon indicating copy to clipboard operation
cppyy copied to clipboard

👮 Add a few property based tests stressing template parameter packs.

Open lukevalenty opened this issue 1 year ago • 4 comments

Added a few property based tests that will really stress out template parameter packs....sorry @wlav! 😅 Requires hypothesis python module. This is the same module and methodology I am using to test some of Intel's open source C++ libraries with.

https://hypothesis.readthedocs.io/en/latest/

lukevalenty avatar Oct 01 '24 18:10 lukevalenty

This will exercise the bugs in both #261 and #262.

lukevalenty avatar Oct 01 '24 18:10 lukevalenty

Always in favor of more tests, albeit that yes, I'm using mostly bare, ancient style. I'll need to add hypothesis as an optional package to the requirements for a test (or dev) target and also prefer to give each set of tests a unique namespace to prevent spurious clashes (not too bad for functions as is the case here, as they're just overloads, but classes can't be redefined).

wlav avatar Oct 03 '24 02:10 wlav

I can update the PR and put the tests into a class, as well as the template fix you gave me in the other issue I filed.

lukevalenty avatar Oct 03 '24 02:10 lukevalenty

I'll need to add hypothesis as an optional package to the requirements for a test (or dev) target

I put the tests in their own namespace, but wasn't quite sure how to setup the requirements for hypothesis.

lukevalenty avatar Oct 03 '24 02:10 lukevalenty