OLD | NEW |
(Empty) | |
| 1 We include a snapshot of gmock from http://googlemock.googlecode.com/svn/trunk |
| 2 with chromium.patch applied. |
| 3 |
| 4 Current revision: 157 |
| 5 |
| 6 |
| 7 -- HOW TO USE -- |
| 8 |
| 9 If you are unfamiliar with gmock, there is an example of how to write a test |
| 10 based on gmock in base/gmock_unittest.cc. To use gmock, just add a dependency |
| 11 onto testing/gmock.gyp:gmock in your gyp target. |
| 12 |
| 13 For more general informaiton, there is a lot of good documentation availble on |
| 14 the googlemock website: |
| 15 |
| 16 http://code.google.com/p/googlemock/ |
| 17 |
| 18 In particular, the "For Dummies" guide is a good place to start. The |
| 19 "CheatSheet" and "CookBook" are better as references. |
| 20 |
| 21 |
| 22 -- RECREATING PACKAGE -- |
| 23 |
| 24 Gmock requires tr1 tuple. However, Visual Studio 2005 does not include |
| 25 tr1 tuple, so a version of boost tuple was added into the third_party |
| 26 tree for chromium. Our version of gmock has been patched to search for |
| 27 this version of tuple inside our source tree. |
| 28 |
| 29 chromium.patch modifies gmock/include/gmock/internal/gmock-port.h so that |
| 30 for _MSC_VER < 1500 (anything newer than Visual Studio 2008), boost tuple |
| 31 is loaded from boost/tr1/tr1/tuple. |
| 32 |
| 33 To recreate this install, do the following: |
| 34 |
| 35 *1) Checkout a copy from svn trunk using --ignore-externals to avoid |
| 36 getting an extra copy of gtest. Use the following command: |
| 37 svn export --ignore-externals \ |
| 38 http://googlemock.googlecode.com/svn/trunk/ gmock |
| 39 2) Patch it with chromium.patch. |
| 40 |
| 41 * Pass -r [revision number] to svn export if you want a specific revision. |
| 42 The current revision of the source is listed at the top of the README. |
| 43 |
| 44 |
| 45 -- ALTERNATIVES TO PATCHING -- |
| 46 |
| 47 The patching of gmock to use boost in VS2005 was settled upon as the lowest |
| 48 impact solution for getting gmock working in VS2005. Patching gmock trades |
| 49 making some assumptions regarding the internal implementations of gmock |
| 50 and boost for a simple, easy to underatnd, implementation that provides |
| 51 relatively good insulation for the rest of the build from the boost dependency. |
| 52 |
| 53 Alternate soltuions are: |
| 54 1) Drop support for VS2005 -- too heavy-handed. |
| 55 2) Add a "tuple" file parallel to gmock-port.h -- still makes assumptions |
| 56 about boost's structure. |
| 57 3) Add boost/tr1/tr1 into the include path -- dirties the include path for |
| 58 all dependencies. |
OLD | NEW |