Warning, /JETSCAPE/external_packages/googletest/googlemock/docs/DevGuide.md is written in an unsupported language. File is not indexed.
0001
0002
0003 If you are interested in understanding the internals of Google Mock,
0004 building from source, or contributing ideas or modifications to the
0005 project, then this document is for you.
0006
0007 # Introduction #
0008
0009 First, let's give you some background of the project.
0010
0011 ## Licensing ##
0012
0013 All Google Mock source and pre-built packages are provided under the [New BSD License](http://www.opensource.org/licenses/bsd-license.php).
0014
0015 ## The Google Mock Community ##
0016
0017 The Google Mock community exists primarily through the [discussion group](http://groups.google.com/group/googlemock), the
0018 [issue tracker](https://github.com/google/googletest/issues) and, to a lesser extent, the [source control repository](../). You are definitely encouraged to contribute to the
0019 discussion and you can also help us to keep the effectiveness of the
0020 group high by following and promoting the guidelines listed here.
0021
0022 ### Please Be Friendly ###
0023
0024 Showing courtesy and respect to others is a vital part of the Google
0025 culture, and we strongly encourage everyone participating in Google
0026 Mock development to join us in accepting nothing less. Of course,
0027 being courteous is not the same as failing to constructively disagree
0028 with each other, but it does mean that we should be respectful of each
0029 other when enumerating the 42 technical reasons that a particular
0030 proposal may not be the best choice. There's never a reason to be
0031 antagonistic or dismissive toward anyone who is sincerely trying to
0032 contribute to a discussion.
0033
0034 Sure, C++ testing is serious business and all that, but it's also
0035 a lot of fun. Let's keep it that way. Let's strive to be one of the
0036 friendliest communities in all of open source.
0037
0038 ### Where to Discuss Google Mock ###
0039
0040 As always, discuss Google Mock in the official [Google C++ Mocking Framework discussion group](http://groups.google.com/group/googlemock). You don't have to actually submit
0041 code in order to sign up. Your participation itself is a valuable
0042 contribution.
0043
0044 # Working with the Code #
0045
0046 If you want to get your hands dirty with the code inside Google Mock,
0047 this is the section for you.
0048
0049 ## Checking Out the Source from Subversion ##
0050
0051 Checking out the Google Mock source is most useful if you plan to
0052 tweak it yourself. You check out the source for Google Mock using a
0053 [Subversion](http://subversion.tigris.org/) client as you would for any
0054 other project hosted on Google Code. Please see the instruction on
0055 the [source code access page](../) for how to do it.
0056
0057 ## Compiling from Source ##
0058
0059 Once you check out the code, you can find instructions on how to
0060 compile it in the [README](../README.md) file.
0061
0062 ## Testing ##
0063
0064 A mocking framework is of no good if itself is not thoroughly tested.
0065 Tests should be written for any new code, and changes should be
0066 verified to not break existing tests before they are submitted for
0067 review. To perform the tests, follow the instructions in [README](http://code.google.com/p/googlemock/source/browse/trunk/README) and
0068 verify that there are no failures.
0069
0070 # Contributing Code #
0071
0072 We are excited that Google Mock is now open source, and hope to get
0073 great patches from the community. Before you fire up your favorite IDE
0074 and begin hammering away at that new feature, though, please take the
0075 time to read this section and understand the process. While it seems
0076 rigorous, we want to keep a high standard of quality in the code
0077 base.
0078
0079 ## Contributor License Agreements ##
0080
0081 You must sign a Contributor License Agreement (CLA) before we can
0082 accept any code. The CLA protects you and us.
0083
0084 * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
0085 * If you work for a company that wants to allow you to contribute your work to Google Mock, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
0086
0087 Follow either of the two links above to access the appropriate CLA and
0088 instructions for how to sign and return it.
0089
0090 ## Coding Style ##
0091
0092 To keep the source consistent, readable, diffable and easy to merge,
0093 we use a fairly rigid coding style, as defined by the [google-styleguide](https://github.com/google/styleguide) project. All patches will be expected
0094 to conform to the style outlined [here](https://github.com/google/styleguide/blob/gh-pages/cppguide.xml).
0095
0096 ## Submitting Patches ##
0097
0098 Please do submit code. Here's what you need to do:
0099
0100 1. Normally you should make your change against the SVN trunk instead of a branch or a tag, as the latter two are for release control and should be treated mostly as read-only.
0101 1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the [Google Mock issue tracker](http://code.google.com/p/googlemock/issues/list). Please don't mix more than one logical change per submittal, because it makes the history hard to follow. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please create one.
0102 1. Also, coordinate with team members that are listed on the issue in question. This ensures that work isn't being duplicated and communicating your plan early also generally leads to better patches.
0103 1. Ensure that your code adheres to the [Google Mock source code style](#Coding_Style.md).
0104 1. Ensure that there are unit tests for your code.
0105 1. Sign a Contributor License Agreement.
0106 1. Create a patch file using `svn diff`.
0107 1. We use [Rietveld](http://codereview.appspot.com/) to do web-based code reviews. You can read about the tool [here](https://github.com/rietveld-codereview/rietveld/wiki). When you are ready, upload your patch via Rietveld and notify `googlemock@googlegroups.com` to review it. There are several ways to upload the patch. We recommend using the [upload\_gmock.py](../scripts/upload_gmock.py) script, which you can find in the `scripts/` folder in the SVN trunk.
0108
0109 ## Google Mock Committers ##
0110
0111 The current members of the Google Mock engineering team are the only
0112 committers at present. In the great tradition of eating one's own
0113 dogfood, we will be requiring each new Google Mock engineering team
0114 member to earn the right to become a committer by following the
0115 procedures in this document, writing consistently great code, and
0116 demonstrating repeatedly that he or she truly gets the zen of Google
0117 Mock.
0118
0119 # Release Process #
0120
0121 We follow the typical release process for Subversion-based projects:
0122
0123 1. A release branch named `release-X.Y` is created.
0124 1. Bugs are fixed and features are added in trunk; those individual patches are merged into the release branch until it's stable.
0125 1. An individual point release (the `Z` in `X.Y.Z`) is made by creating a tag from the branch.
0126 1. Repeat steps 2 and 3 throughout one release cycle (as determined by features or time).
0127 1. Go back to step 1 to create another release branch and so on.
0128
0129
0130 ---
0131
0132 This page is based on the [Making GWT Better](http://code.google.com/webtoolkit/makinggwtbetter.html) guide from the [Google Web Toolkit](http://code.google.com/webtoolkit/) project. Except as otherwise [noted](http://code.google.com/policies.html#restrictions), the content of this page is licensed under the [Creative Commons Attribution 2.5 License](http://creativecommons.org/licenses/by/2.5/).