Mocking clock_gettime #3841
Unanswered
JackNWhite
asked this question in
Community Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I am unit testing a unit which calls
clock_gettime
. I have written a mock which increases a counter each time it is called uses the counter as an index into an array of expected inputs and intended outputs.After writing one test, I discovered that the test was finishing and then failures were being reported in the mock
clock_gettime()
after the end of the test.It looks to me like Google Test is calling the mock for its own purposes.
How can I disable, or circumvent, this behaviour? I do not use any timing information from GTest.
I do not use Google Mock.
Beta Was this translation helpful? Give feedback.
All reactions