Warning, /JETSCAPE/external_packages/googletest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md is written in an unsupported language. File is not indexed.
0001
0002
0003 Please send your questions to the
0004 [googlemock](http://groups.google.com/group/googlemock) discussion
0005 group. If you need help with compiler errors, make sure you have
0006 tried [Google Mock Doctor](#How_am_I_supposed_to_make_sense_of_these_horrible_template_error.md) first.
0007
0008 ## When I call a method on my mock object, the method for the real object is invoked instead. What's the problem? ##
0009
0010 In order for a method to be mocked, it must be _virtual_, unless you use the [high-perf dependency injection technique](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Mocking_Nonvirtual_Methods).
0011
0012 ## I wrote some matchers. After I upgraded to a new version of Google Mock, they no longer compile. What's going on? ##
0013
0014 After version 1.4.0 of Google Mock was released, we had an idea on how
0015 to make it easier to write matchers that can generate informative
0016 messages efficiently. We experimented with this idea and liked what
0017 we saw. Therefore we decided to implement it.
0018
0019 Unfortunately, this means that if you have defined your own matchers
0020 by implementing `MatcherInterface` or using `MakePolymorphicMatcher()`,
0021 your definitions will no longer compile. Matchers defined using the
0022 `MATCHER*` family of macros are not affected.
0023
0024 Sorry for the hassle if your matchers are affected. We believe it's
0025 in everyone's long-term interest to make this change sooner than
0026 later. Fortunately, it's usually not hard to migrate an existing
0027 matcher to the new API. Here's what you need to do:
0028
0029 If you wrote your matcher like this:
0030 ```
0031 // Old matcher definition that doesn't work with the latest
0032 // Google Mock.
0033 using ::testing::MatcherInterface;
0034 ...
0035 class MyWonderfulMatcher : public MatcherInterface<MyType> {
0036 public:
0037 ...
0038 virtual bool Matches(MyType value) const {
0039 // Returns true if value matches.
0040 return value.GetFoo() > 5;
0041 }
0042 ...
0043 };
0044 ```
0045
0046 you'll need to change it to:
0047 ```
0048 // New matcher definition that works with the latest Google Mock.
0049 using ::testing::MatcherInterface;
0050 using ::testing::MatchResultListener;
0051 ...
0052 class MyWonderfulMatcher : public MatcherInterface<MyType> {
0053 public:
0054 ...
0055 virtual bool MatchAndExplain(MyType value,
0056 MatchResultListener* listener) const {
0057 // Returns true if value matches.
0058 return value.GetFoo() > 5;
0059 }
0060 ...
0061 };
0062 ```
0063 (i.e. rename `Matches()` to `MatchAndExplain()` and give it a second
0064 argument of type `MatchResultListener*`.)
0065
0066 If you were also using `ExplainMatchResultTo()` to improve the matcher
0067 message:
0068 ```
0069 // Old matcher definition that doesn't work with the lastest
0070 // Google Mock.
0071 using ::testing::MatcherInterface;
0072 ...
0073 class MyWonderfulMatcher : public MatcherInterface<MyType> {
0074 public:
0075 ...
0076 virtual bool Matches(MyType value) const {
0077 // Returns true if value matches.
0078 return value.GetFoo() > 5;
0079 }
0080
0081 virtual void ExplainMatchResultTo(MyType value,
0082 ::std::ostream* os) const {
0083 // Prints some helpful information to os to help
0084 // a user understand why value matches (or doesn't match).
0085 *os << "the Foo property is " << value.GetFoo();
0086 }
0087 ...
0088 };
0089 ```
0090
0091 you should move the logic of `ExplainMatchResultTo()` into
0092 `MatchAndExplain()`, using the `MatchResultListener` argument where
0093 the `::std::ostream` was used:
0094 ```
0095 // New matcher definition that works with the latest Google Mock.
0096 using ::testing::MatcherInterface;
0097 using ::testing::MatchResultListener;
0098 ...
0099 class MyWonderfulMatcher : public MatcherInterface<MyType> {
0100 public:
0101 ...
0102 virtual bool MatchAndExplain(MyType value,
0103 MatchResultListener* listener) const {
0104 // Returns true if value matches.
0105 *listener << "the Foo property is " << value.GetFoo();
0106 return value.GetFoo() > 5;
0107 }
0108 ...
0109 };
0110 ```
0111
0112 If your matcher is defined using `MakePolymorphicMatcher()`:
0113 ```
0114 // Old matcher definition that doesn't work with the latest
0115 // Google Mock.
0116 using ::testing::MakePolymorphicMatcher;
0117 ...
0118 class MyGreatMatcher {
0119 public:
0120 ...
0121 bool Matches(MyType value) const {
0122 // Returns true if value matches.
0123 return value.GetBar() < 42;
0124 }
0125 ...
0126 };
0127 ... MakePolymorphicMatcher(MyGreatMatcher()) ...
0128 ```
0129
0130 you should rename the `Matches()` method to `MatchAndExplain()` and
0131 add a `MatchResultListener*` argument (the same as what you need to do
0132 for matchers defined by implementing `MatcherInterface`):
0133 ```
0134 // New matcher definition that works with the latest Google Mock.
0135 using ::testing::MakePolymorphicMatcher;
0136 using ::testing::MatchResultListener;
0137 ...
0138 class MyGreatMatcher {
0139 public:
0140 ...
0141 bool MatchAndExplain(MyType value,
0142 MatchResultListener* listener) const {
0143 // Returns true if value matches.
0144 return value.GetBar() < 42;
0145 }
0146 ...
0147 };
0148 ... MakePolymorphicMatcher(MyGreatMatcher()) ...
0149 ```
0150
0151 If your polymorphic matcher uses `ExplainMatchResultTo()` for better
0152 failure messages:
0153 ```
0154 // Old matcher definition that doesn't work with the latest
0155 // Google Mock.
0156 using ::testing::MakePolymorphicMatcher;
0157 ...
0158 class MyGreatMatcher {
0159 public:
0160 ...
0161 bool Matches(MyType value) const {
0162 // Returns true if value matches.
0163 return value.GetBar() < 42;
0164 }
0165 ...
0166 };
0167 void ExplainMatchResultTo(const MyGreatMatcher& matcher,
0168 MyType value,
0169 ::std::ostream* os) {
0170 // Prints some helpful information to os to help
0171 // a user understand why value matches (or doesn't match).
0172 *os << "the Bar property is " << value.GetBar();
0173 }
0174 ... MakePolymorphicMatcher(MyGreatMatcher()) ...
0175 ```
0176
0177 you'll need to move the logic inside `ExplainMatchResultTo()` to
0178 `MatchAndExplain()`:
0179 ```
0180 // New matcher definition that works with the latest Google Mock.
0181 using ::testing::MakePolymorphicMatcher;
0182 using ::testing::MatchResultListener;
0183 ...
0184 class MyGreatMatcher {
0185 public:
0186 ...
0187 bool MatchAndExplain(MyType value,
0188 MatchResultListener* listener) const {
0189 // Returns true if value matches.
0190 *listener << "the Bar property is " << value.GetBar();
0191 return value.GetBar() < 42;
0192 }
0193 ...
0194 };
0195 ... MakePolymorphicMatcher(MyGreatMatcher()) ...
0196 ```
0197
0198 For more information, you can read these
0199 [two](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Writing_New_Monomorphic_Matchers)
0200 [recipes](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Writing_New_Polymorphic_Matchers)
0201 from the cookbook. As always, you
0202 are welcome to post questions on `googlemock@googlegroups.com` if you
0203 need any help.
0204
0205 ## When using Google Mock, do I have to use Google Test as the testing framework? I have my favorite testing framework and don't want to switch. ##
0206
0207 Google Mock works out of the box with Google Test. However, it's easy
0208 to configure it to work with any testing framework of your choice.
0209 [Here](http://code.google.com/p/googlemock/wiki/V1_6_ForDummies#Using_Google_Mock_with_Any_Testing_Framework) is how.
0210
0211 ## How am I supposed to make sense of these horrible template errors? ##
0212
0213 If you are confused by the compiler errors gcc threw at you,
0214 try consulting the _Google Mock Doctor_ tool first. What it does is to
0215 scan stdin for gcc error messages, and spit out diagnoses on the
0216 problems (we call them diseases) your code has.
0217
0218 To "install", run command:
0219 ```
0220 alias gmd='<path to googlemock>/scripts/gmock_doctor.py'
0221 ```
0222
0223 To use it, do:
0224 ```
0225 <your-favorite-build-command> <your-test> 2>&1 | gmd
0226 ```
0227
0228 For example:
0229 ```
0230 make my_test 2>&1 | gmd
0231 ```
0232
0233 Or you can run `gmd` and copy-n-paste gcc's error messages to it.
0234
0235 ## Can I mock a variadic function? ##
0236
0237 You cannot mock a variadic function (i.e. a function taking ellipsis
0238 (`...`) arguments) directly in Google Mock.
0239
0240 The problem is that in general, there is _no way_ for a mock object to
0241 know how many arguments are passed to the variadic method, and what
0242 the arguments' types are. Only the _author of the base class_ knows
0243 the protocol, and we cannot look into his head.
0244
0245 Therefore, to mock such a function, the _user_ must teach the mock
0246 object how to figure out the number of arguments and their types. One
0247 way to do it is to provide overloaded versions of the function.
0248
0249 Ellipsis arguments are inherited from C and not really a C++ feature.
0250 They are unsafe to use and don't work with arguments that have
0251 constructors or destructors. Therefore we recommend to avoid them in
0252 C++ as much as possible.
0253
0254 ## MSVC gives me warning C4301 or C4373 when I define a mock method with a const parameter. Why? ##
0255
0256 If you compile this using Microsoft Visual C++ 2005 SP1:
0257 ```
0258 class Foo {
0259 ...
0260 virtual void Bar(const int i) = 0;
0261 };
0262
0263 class MockFoo : public Foo {
0264 ...
0265 MOCK_METHOD1(Bar, void(const int i));
0266 };
0267 ```
0268 You may get the following warning:
0269 ```
0270 warning C4301: 'MockFoo::Bar': overriding virtual function only differs from 'Foo::Bar' by const/volatile qualifier
0271 ```
0272
0273 This is a MSVC bug. The same code compiles fine with gcc ,for
0274 example. If you use Visual C++ 2008 SP1, you would get the warning:
0275 ```
0276 warning C4373: 'MockFoo::Bar': virtual function overrides 'Foo::Bar', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
0277 ```
0278
0279 In C++, if you _declare_ a function with a `const` parameter, the
0280 `const` modifier is _ignored_. Therefore, the `Foo` base class above
0281 is equivalent to:
0282 ```
0283 class Foo {
0284 ...
0285 virtual void Bar(int i) = 0; // int or const int? Makes no difference.
0286 };
0287 ```
0288
0289 In fact, you can _declare_ Bar() with an `int` parameter, and _define_
0290 it with a `const int` parameter. The compiler will still match them
0291 up.
0292
0293 Since making a parameter `const` is meaningless in the method
0294 _declaration_, we recommend to remove it in both `Foo` and `MockFoo`.
0295 That should workaround the VC bug.
0296
0297 Note that we are talking about the _top-level_ `const` modifier here.
0298 If the function parameter is passed by pointer or reference, declaring
0299 the _pointee_ or _referee_ as `const` is still meaningful. For
0300 example, the following two declarations are _not_ equivalent:
0301 ```
0302 void Bar(int* p); // Neither p nor *p is const.
0303 void Bar(const int* p); // p is not const, but *p is.
0304 ```
0305
0306 ## I have a huge mock class, and Microsoft Visual C++ runs out of memory when compiling it. What can I do? ##
0307
0308 We've noticed that when the `/clr` compiler flag is used, Visual C++
0309 uses 5~6 times as much memory when compiling a mock class. We suggest
0310 to avoid `/clr` when compiling native C++ mocks.
0311
0312 ## I can't figure out why Google Mock thinks my expectations are not satisfied. What should I do? ##
0313
0314 You might want to run your test with
0315 `--gmock_verbose=info`. This flag lets Google Mock print a trace
0316 of every mock function call it receives. By studying the trace,
0317 you'll gain insights on why the expectations you set are not met.
0318
0319 ## How can I assert that a function is NEVER called? ##
0320
0321 ```
0322 EXPECT_CALL(foo, Bar(_))
0323 .Times(0);
0324 ```
0325
0326 ## I have a failed test where Google Mock tells me TWICE that a particular expectation is not satisfied. Isn't this redundant? ##
0327
0328 When Google Mock detects a failure, it prints relevant information
0329 (the mock function arguments, the state of relevant expectations, and
0330 etc) to help the user debug. If another failure is detected, Google
0331 Mock will do the same, including printing the state of relevant
0332 expectations.
0333
0334 Sometimes an expectation's state didn't change between two failures,
0335 and you'll see the same description of the state twice. They are
0336 however _not_ redundant, as they refer to _different points in time_.
0337 The fact they are the same _is_ interesting information.
0338
0339 ## I get a heap check failure when using a mock object, but using a real object is fine. What can be wrong? ##
0340
0341 Does the class (hopefully a pure interface) you are mocking have a
0342 virtual destructor?
0343
0344 Whenever you derive from a base class, make sure its destructor is
0345 virtual. Otherwise Bad Things will happen. Consider the following
0346 code:
0347
0348 ```
0349 class Base {
0350 public:
0351 // Not virtual, but should be.
0352 ~Base() { ... }
0353 ...
0354 };
0355
0356 class Derived : public Base {
0357 public:
0358 ...
0359 private:
0360 std::string value_;
0361 };
0362
0363 ...
0364 Base* p = new Derived;
0365 ...
0366 delete p; // Surprise! ~Base() will be called, but ~Derived() will not
0367 // - value_ is leaked.
0368 ```
0369
0370 By changing `~Base()` to virtual, `~Derived()` will be correctly
0371 called when `delete p` is executed, and the heap checker
0372 will be happy.
0373
0374 ## The "newer expectations override older ones" rule makes writing expectations awkward. Why does Google Mock do that? ##
0375
0376 When people complain about this, often they are referring to code like:
0377
0378 ```
0379 // foo.Bar() should be called twice, return 1 the first time, and return
0380 // 2 the second time. However, I have to write the expectations in the
0381 // reverse order. This sucks big time!!!
0382 EXPECT_CALL(foo, Bar())
0383 .WillOnce(Return(2))
0384 .RetiresOnSaturation();
0385 EXPECT_CALL(foo, Bar())
0386 .WillOnce(Return(1))
0387 .RetiresOnSaturation();
0388 ```
0389
0390 The problem is that they didn't pick the **best** way to express the test's
0391 intent.
0392
0393 By default, expectations don't have to be matched in _any_ particular
0394 order. If you want them to match in a certain order, you need to be
0395 explicit. This is Google Mock's (and jMock's) fundamental philosophy: it's
0396 easy to accidentally over-specify your tests, and we want to make it
0397 harder to do so.
0398
0399 There are two better ways to write the test spec. You could either
0400 put the expectations in sequence:
0401
0402 ```
0403 // foo.Bar() should be called twice, return 1 the first time, and return
0404 // 2 the second time. Using a sequence, we can write the expectations
0405 // in their natural order.
0406 {
0407 InSequence s;
0408 EXPECT_CALL(foo, Bar())
0409 .WillOnce(Return(1))
0410 .RetiresOnSaturation();
0411 EXPECT_CALL(foo, Bar())
0412 .WillOnce(Return(2))
0413 .RetiresOnSaturation();
0414 }
0415 ```
0416
0417 or you can put the sequence of actions in the same expectation:
0418
0419 ```
0420 // foo.Bar() should be called twice, return 1 the first time, and return
0421 // 2 the second time.
0422 EXPECT_CALL(foo, Bar())
0423 .WillOnce(Return(1))
0424 .WillOnce(Return(2))
0425 .RetiresOnSaturation();
0426 ```
0427
0428 Back to the original questions: why does Google Mock search the
0429 expectations (and `ON_CALL`s) from back to front? Because this
0430 allows a user to set up a mock's behavior for the common case early
0431 (e.g. in the mock's constructor or the test fixture's set-up phase)
0432 and customize it with more specific rules later. If Google Mock
0433 searches from front to back, this very useful pattern won't be
0434 possible.
0435
0436 ## Google Mock prints a warning when a function without EXPECT\_CALL is called, even if I have set its behavior using ON\_CALL. Would it be reasonable not to show the warning in this case? ##
0437
0438 When choosing between being neat and being safe, we lean toward the
0439 latter. So the answer is that we think it's better to show the
0440 warning.
0441
0442 Often people write `ON_CALL`s in the mock object's
0443 constructor or `SetUp()`, as the default behavior rarely changes from
0444 test to test. Then in the test body they set the expectations, which
0445 are often different for each test. Having an `ON_CALL` in the set-up
0446 part of a test doesn't mean that the calls are expected. If there's
0447 no `EXPECT_CALL` and the method is called, it's possibly an error. If
0448 we quietly let the call go through without notifying the user, bugs
0449 may creep in unnoticed.
0450
0451 If, however, you are sure that the calls are OK, you can write
0452
0453 ```
0454 EXPECT_CALL(foo, Bar(_))
0455 .WillRepeatedly(...);
0456 ```
0457
0458 instead of
0459
0460 ```
0461 ON_CALL(foo, Bar(_))
0462 .WillByDefault(...);
0463 ```
0464
0465 This tells Google Mock that you do expect the calls and no warning should be
0466 printed.
0467
0468 Also, you can control the verbosity using the `--gmock_verbose` flag.
0469 If you find the output too noisy when debugging, just choose a less
0470 verbose level.
0471
0472 ## How can I delete the mock function's argument in an action? ##
0473
0474 If you find yourself needing to perform some action that's not
0475 supported by Google Mock directly, remember that you can define your own
0476 actions using
0477 [MakeAction()](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Writing_New_Actions) or
0478 [MakePolymorphicAction()](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Writing_New_Polymorphic_Actions),
0479 or you can write a stub function and invoke it using
0480 [Invoke()](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Using_Functions_Methods_Functors).
0481
0482 ## MOCK\_METHODn()'s second argument looks funny. Why don't you use the MOCK\_METHODn(Method, return\_type, arg\_1, ..., arg\_n) syntax? ##
0483
0484 What?! I think it's beautiful. :-)
0485
0486 While which syntax looks more natural is a subjective matter to some
0487 extent, Google Mock's syntax was chosen for several practical advantages it
0488 has.
0489
0490 Try to mock a function that takes a map as an argument:
0491 ```
0492 virtual int GetSize(const map<int, std::string>& m);
0493 ```
0494
0495 Using the proposed syntax, it would be:
0496 ```
0497 MOCK_METHOD1(GetSize, int, const map<int, std::string>& m);
0498 ```
0499
0500 Guess what? You'll get a compiler error as the compiler thinks that
0501 `const map<int, std::string>& m` are **two**, not one, arguments. To work
0502 around this you can use `typedef` to give the map type a name, but
0503 that gets in the way of your work. Google Mock's syntax avoids this
0504 problem as the function's argument types are protected inside a pair
0505 of parentheses:
0506 ```
0507 // This compiles fine.
0508 MOCK_METHOD1(GetSize, int(const map<int, std::string>& m));
0509 ```
0510
0511 You still need a `typedef` if the return type contains an unprotected
0512 comma, but that's much rarer.
0513
0514 Other advantages include:
0515 1. `MOCK_METHOD1(Foo, int, bool)` can leave a reader wonder whether the method returns `int` or `bool`, while there won't be such confusion using Google Mock's syntax.
0516 1. The way Google Mock describes a function type is nothing new, although many people may not be familiar with it. The same syntax was used in C, and the `function` library in `tr1` uses this syntax extensively. Since `tr1` will become a part of the new version of STL, we feel very comfortable to be consistent with it.
0517 1. The function type syntax is also used in other parts of Google Mock's API (e.g. the action interface) in order to make the implementation tractable. A user needs to learn it anyway in order to utilize Google Mock's more advanced features. We'd as well stick to the same syntax in `MOCK_METHOD*`!
0518
0519 ## My code calls a static/global function. Can I mock it? ##
0520
0521 You can, but you need to make some changes.
0522
0523 In general, if you find yourself needing to mock a static function,
0524 it's a sign that your modules are too tightly coupled (and less
0525 flexible, less reusable, less testable, etc). You are probably better
0526 off defining a small interface and call the function through that
0527 interface, which then can be easily mocked. It's a bit of work
0528 initially, but usually pays for itself quickly.
0529
0530 This Google Testing Blog
0531 [post](http://googletesting.blogspot.com/2008/06/defeat-static-cling.html)
0532 says it excellently. Check it out.
0533
0534 ## My mock object needs to do complex stuff. It's a lot of pain to specify the actions. Google Mock sucks! ##
0535
0536 I know it's not a question, but you get an answer for free any way. :-)
0537
0538 With Google Mock, you can create mocks in C++ easily. And people might be
0539 tempted to use them everywhere. Sometimes they work great, and
0540 sometimes you may find them, well, a pain to use. So, what's wrong in
0541 the latter case?
0542
0543 When you write a test without using mocks, you exercise the code and
0544 assert that it returns the correct value or that the system is in an
0545 expected state. This is sometimes called "state-based testing".
0546
0547 Mocks are great for what some call "interaction-based" testing:
0548 instead of checking the system state at the very end, mock objects
0549 verify that they are invoked the right way and report an error as soon
0550 as it arises, giving you a handle on the precise context in which the
0551 error was triggered. This is often more effective and economical to
0552 do than state-based testing.
0553
0554 If you are doing state-based testing and using a test double just to
0555 simulate the real object, you are probably better off using a fake.
0556 Using a mock in this case causes pain, as it's not a strong point for
0557 mocks to perform complex actions. If you experience this and think
0558 that mocks suck, you are just not using the right tool for your
0559 problem. Or, you might be trying to solve the wrong problem. :-)
0560
0561 ## I got a warning "Uninteresting function call encountered - default action taken.." Should I panic? ##
0562
0563 By all means, NO! It's just an FYI.
0564
0565 What it means is that you have a mock function, you haven't set any
0566 expectations on it (by Google Mock's rule this means that you are not
0567 interested in calls to this function and therefore it can be called
0568 any number of times), and it is called. That's OK - you didn't say
0569 it's not OK to call the function!
0570
0571 What if you actually meant to disallow this function to be called, but
0572 forgot to write `EXPECT_CALL(foo, Bar()).Times(0)`? While
0573 one can argue that it's the user's fault, Google Mock tries to be nice and
0574 prints you a note.
0575
0576 So, when you see the message and believe that there shouldn't be any
0577 uninteresting calls, you should investigate what's going on. To make
0578 your life easier, Google Mock prints the function name and arguments
0579 when an uninteresting call is encountered.
0580
0581 ## I want to define a custom action. Should I use Invoke() or implement the action interface? ##
0582
0583 Either way is fine - you want to choose the one that's more convenient
0584 for your circumstance.
0585
0586 Usually, if your action is for a particular function type, defining it
0587 using `Invoke()` should be easier; if your action can be used in
0588 functions of different types (e.g. if you are defining
0589 `Return(value)`), `MakePolymorphicAction()` is
0590 easiest. Sometimes you want precise control on what types of
0591 functions the action can be used in, and implementing
0592 `ActionInterface` is the way to go here. See the implementation of
0593 `Return()` in `include/gmock/gmock-actions.h` for an example.
0594
0595 ## I'm using the set-argument-pointee action, and the compiler complains about "conflicting return type specified". What does it mean? ##
0596
0597 You got this error as Google Mock has no idea what value it should return
0598 when the mock method is called. `SetArgPointee()` says what the
0599 side effect is, but doesn't say what the return value should be. You
0600 need `DoAll()` to chain a `SetArgPointee()` with a `Return()`.
0601
0602 See this [recipe](http://code.google.com/p/googlemock/wiki/V1_6_CookBook#Mocking_Side_Effects) for more details and an example.
0603
0604
0605 ## My question is not in your FAQ! ##
0606
0607 If you cannot find the answer to your question in this FAQ, there are
0608 some other resources you can use:
0609
0610 1. read other [wiki pages](http://code.google.com/p/googlemock/w/list),
0611 1. search the mailing list [archive](http://groups.google.com/group/googlemock/topics),
0612 1. ask it on [googlemock@googlegroups.com](mailto:googlemock@googlegroups.com) and someone will answer it (to prevent spam, we require you to join the [discussion group](http://groups.google.com/group/googlemock) before you can post.).
0613
0614 Please note that creating an issue in the
0615 [issue tracker](http://code.google.com/p/googlemock/issues/list) is _not_
0616 a good way to get your answer, as it is monitored infrequently by a
0617 very small number of people.
0618
0619 When asking a question, it's helpful to provide as much of the
0620 following information as possible (people cannot help you if there's
0621 not enough information in your question):
0622
0623 * the version (or the revision number if you check out from SVN directly) of Google Mock you use (Google Mock is under active development, so it's possible that your problem has been solved in a later version),
0624 * your operating system,
0625 * the name and version of your compiler,
0626 * the complete command line flags you give to your compiler,
0627 * the complete compiler error messages (if the question is about compilation),
0628 * the _actual_ code (ideally, a minimal but complete program) that has the problem you encounter.