You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.
googlemock uses a global registry object to record the states of mock
objects. If a mock object is created and expectations are set on it before
the registry is created, the program will crash.
We should create the registry the first time it's needed.
Original issue reported on code.google.com by zhanyong...@gmail.com on 23 Jun 2009 at 4:55
The text was updated successfully, but these errors were encountered:
On second thought, we probably don't want to support this.
InitGoogleMock() must be called to initialize Google Mock before it can be
used, as
the behavior of Google Mock can be affected by command line flags. The command
line
flags cannot be obtained before main() is entered. Therefore, Google Mock must
not
be used before main() is entered.
Once main() is entered, the global registry object is already created and can
be
used.
So, it's invalid for a user program to create a mock and set expectations on it
before main() is entered.
Original comment by zhanyong...@gmail.com on 21 Sep 2009 at 10:55
Original issue reported on code.google.com by
zhanyong...@gmail.com
on 23 Jun 2009 at 4:55The text was updated successfully, but these errors were encountered: