-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing initialisation with arguments #106
Comments
Thanks @DanBennettDev -- The plumbing for the unit testing is the largest area with room for growth and improvement. One thing that might be confusing in the debugger is that 2 instances of your object will be created. The first one is a "dummy" construction where an instance is created, information from it is harvested to create the Max class, and then it is destroyed. This only happens once. Then the real instance to be used gets created. That's a great point about us having no examples of unit tests where args are being passed. |
ok thanks - I'll go back and dig into the test code a bit more deeply. |
I find this issue, now I would like to test arguments. in
in
If it looks good, I can send a pull request. |
Hi @leico , If you would like to submit a Pull Request I'd be happy to review it! Thanks, |
So far as I can tell the test wrapper provided doesn't support initialising your objects with arguments -
test_wrapper
constructor is calling the constructor forwrapper_new
withnullptr
for the argument array. This makes it a difficult to test externals with substantial initialisation processes.It's possible I'm being dumb here and there's an easy way around this. I tried adding a constructor (as below) that takes args to the
test_wrapper
, but when I follow execution in the debugger this still seems to result in my external's class constructor being called with 0 arguments - so there's obviously a fair bit I'm missing here.The text was updated successfully, but these errors were encountered: