Skip to content
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

Running Unit Tests with the mocked class #100

Closed
zichaelpath opened this issue Jan 7, 2021 · 3 comments
Closed

Running Unit Tests with the mocked class #100

zichaelpath opened this issue Jan 7, 2021 · 3 comments

Comments

@zichaelpath
Copy link

Hello,
I am currently testing a feature of software that requires a hardware component, and my solution to that was to create a partially mocked class of the class being tested in order to control the outcome of the derived classes private functions. While running that test suite individually, I get no errors in the tests of that suite; however when I run all the test suites, the tests after that test suite is completed gives me an "invalid parameter detected by a C Runtime Library".

My issue is that this circumstance is causing all the other tests after this suite to fail with our own error system, however removing the test suite with the mocked class being tested causes all the other suites to run as expected and pass.

Are we able to test a partially mocked class and run all the boost tests without the latter suites crashing?

@mat007
Copy link
Owner

mat007 commented Jan 7, 2021

Hi,

It’s a bit hard to debug without seeing the code. Would you be able to provide a minimal example reproducing the problem?

@zichaelpath
Copy link
Author

Absolutely I can, is there any chance you can give me an email to send the sample code to? I'm having difficulty uploading it to github at the moment

@mat007
Copy link
Owner

mat007 commented Jan 24, 2022

Hey, I don’t remember if I ever gave you my email in the end, sorry about that.
Do you still need help? 😬

@mat007 mat007 closed this as completed Sep 28, 2024
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

No branches or pull requests

2 participants