Updated broken and outdated URLs
This commit is contained in:
parent
40904f8970
commit
309e8a271e
@ -1,5 +1,5 @@
|
|||||||
# Build matrix / environment variable are explained on:
|
# Build matrix / environment variable are explained on:
|
||||||
# http://about.travis-ci.org/docs/user/build-configuration/
|
# https://docs.travis-ci.com/user/customizing-the-build/
|
||||||
# This file can be validated on:
|
# This file can be validated on:
|
||||||
# http://lint.travis-ci.org/
|
# http://lint.travis-ci.org/
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ Admittedly, this test is contrived and doesn't do much. You can easily achieve t
|
|||||||
|
|
||||||
## Using Google Mock with Any Testing Framework ##
|
## Using Google Mock with Any Testing Framework ##
|
||||||
If you want to use something other than Google Test (e.g. [CppUnit](http://sourceforge.net/projects/cppunit/) or
|
If you want to use something other than Google Test (e.g. [CppUnit](http://sourceforge.net/projects/cppunit/) or
|
||||||
[CxxTest](http://cxxtest.tigris.org/)) as your testing framework, just change the `main()` function in the previous section to:
|
[CxxTest](https://cxxtest.com/)) as your testing framework, just change the `main()` function in the previous section to:
|
||||||
```
|
```
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
// The following line causes Google Mock to throw an exception on failure,
|
// The following line causes Google Mock to throw an exception on failure,
|
||||||
|
@ -528,7 +528,7 @@ interface, which then can be easily mocked. It's a bit of work
|
|||||||
initially, but usually pays for itself quickly.
|
initially, but usually pays for itself quickly.
|
||||||
|
|
||||||
This Google Testing Blog
|
This Google Testing Blog
|
||||||
[post](http://googletesting.blogspot.com/2008/06/defeat-static-cling.html)
|
[post](https://testing.googleblog.com/2008/06/defeat-static-cling.html)
|
||||||
says it excellently. Check it out.
|
says it excellently. Check it out.
|
||||||
|
|
||||||
## My mock object needs to do complex stuff. It's a lot of pain to specify the actions. Google Mock sucks! ##
|
## My mock object needs to do complex stuff. It's a lot of pain to specify the actions. Google Mock sucks! ##
|
||||||
|
@ -242,7 +242,7 @@ class AbstractRpcServer(object):
|
|||||||
The authentication process works as follows:
|
The authentication process works as follows:
|
||||||
1) We get a username and password from the user
|
1) We get a username and password from the user
|
||||||
2) We use ClientLogin to obtain an AUTH token for the user
|
2) We use ClientLogin to obtain an AUTH token for the user
|
||||||
(see http://code.google.com/apis/accounts/AuthForInstalledApps.html).
|
(see https://developers.google.com/identity/protocols/AuthForInstalledApps).
|
||||||
3) We pass the auth token to /_ah/login on the server to obtain an
|
3) We pass the auth token to /_ah/login on the server to obtain an
|
||||||
authentication cookie. If login was successful, it tries to redirect
|
authentication cookie. If login was successful, it tries to redirect
|
||||||
us to the URL we provided.
|
us to the URL we provided.
|
||||||
@ -506,7 +506,7 @@ def EncodeMultipartFormData(fields, files):
|
|||||||
(content_type, body) ready for httplib.HTTP instance.
|
(content_type, body) ready for httplib.HTTP instance.
|
||||||
|
|
||||||
Source:
|
Source:
|
||||||
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
|
https://web.archive.org/web/20160116052001/code.activestate.com/recipes/146306
|
||||||
"""
|
"""
|
||||||
BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
|
BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
|
||||||
CRLF = '\r\n'
|
CRLF = '\r\n'
|
||||||
@ -807,7 +807,7 @@ class SubversionVCS(VersionControlSystem):
|
|||||||
# svn cat translates keywords but svn diff doesn't. As a result of this
|
# svn cat translates keywords but svn diff doesn't. As a result of this
|
||||||
# behavior patching.PatchChunks() fails with a chunk mismatch error.
|
# behavior patching.PatchChunks() fails with a chunk mismatch error.
|
||||||
# This part was originally written by the Review Board development team
|
# This part was originally written by the Review Board development team
|
||||||
# who had the same problem (http://reviews.review-board.org/r/276/).
|
# who had the same problem (https://reviews.reviewboard.org/r/276/).
|
||||||
# Mapping of keywords to known aliases
|
# Mapping of keywords to known aliases
|
||||||
svn_keywords = {
|
svn_keywords = {
|
||||||
# Standard keywords
|
# Standard keywords
|
||||||
@ -860,7 +860,7 @@ class SubversionVCS(VersionControlSystem):
|
|||||||
status_lines = status.splitlines()
|
status_lines = status.splitlines()
|
||||||
# If file is in a cl, the output will begin with
|
# If file is in a cl, the output will begin with
|
||||||
# "\n--- Changelist 'cl_name':\n". See
|
# "\n--- Changelist 'cl_name':\n". See
|
||||||
# http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt
|
# https://web.archive.org/web/20090918234815/svn.collab.net/repos/svn/trunk/notes/changelist-design.txt
|
||||||
if (len(status_lines) == 3 and
|
if (len(status_lines) == 3 and
|
||||||
not status_lines[0] and
|
not status_lines[0] and
|
||||||
status_lines[1].startswith("--- Changelist")):
|
status_lines[1].startswith("--- Changelist")):
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
// causes a link error when _tmain is defined in a static library and UNICODE
|
// causes a link error when _tmain is defined in a static library and UNICODE
|
||||||
// is enabled. For this reason instead of _tmain, main function is used on
|
// is enabled. For this reason instead of _tmain, main function is used on
|
||||||
// Windows. See the following link to track the current status of this bug:
|
// Windows. See the following link to track the current status of this bug:
|
||||||
// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT
|
// https://web.archive.org/web/20170912203238/connect.microsoft.com/VisualStudio/feedback/details/394464/wmain-link-error-in-the-static-library // NOLINT
|
||||||
#if GTEST_OS_WINDOWS_MOBILE
|
#if GTEST_OS_WINDOWS_MOBILE
|
||||||
# include <tchar.h> // NOLINT
|
# include <tchar.h> // NOLINT
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ macro(fix_default_compiler_settings_)
|
|||||||
if (MSVC)
|
if (MSVC)
|
||||||
# For MSVC, CMake sets certain flags to defaults we want to override.
|
# For MSVC, CMake sets certain flags to defaults we want to override.
|
||||||
# This replacement code is taken from sample in the CMake Wiki at
|
# This replacement code is taken from sample in the CMake Wiki at
|
||||||
# http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace.
|
# https://gitlab.kitware.com/cmake/community/wikis/FAQ#dynamic-replace.
|
||||||
foreach (flag_var
|
foreach (flag_var
|
||||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||||
|
@ -6,7 +6,7 @@ This guide will explain how to use the Google Testing Framework in your Xcode pr
|
|||||||
|
|
||||||
Here is the quick guide for using Google Test in your Xcode project.
|
Here is the quick guide for using Google Test in your Xcode project.
|
||||||
|
|
||||||
1. Download the source from the [website](http://code.google.com/p/googletest) using this command: `svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only`.
|
1. Download the source from the [website](https://github.com/google/googletest) using this command: `svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only`.
|
||||||
1. Open up the `gtest.xcodeproj` in the `googletest-read-only/xcode/` directory and build the gtest.framework.
|
1. Open up the `gtest.xcodeproj` in the `googletest-read-only/xcode/` directory and build the gtest.framework.
|
||||||
1. Create a new "Shell Tool" target in your Xcode project called something like "UnitTests".
|
1. Create a new "Shell Tool" target in your Xcode project called something like "UnitTests".
|
||||||
1. Add the gtest.framework to your project and add it to the "Link Binary with Libraries" build phase of "UnitTests".
|
1. Add the gtest.framework to your project and add it to the "Link Binary with Libraries" build phase of "UnitTests".
|
||||||
@ -18,7 +18,7 @@ The following sections further explain each of the steps listed above in depth,
|
|||||||
|
|
||||||
# Get the Source #
|
# Get the Source #
|
||||||
|
|
||||||
Currently, the gtest.framework discussed here isn't available in a tagged release of Google Test, it is only available in the trunk. As explained at the Google Test [site](http://code.google.com/p/googletest/source/checkout">svn), you can get the code from anonymous SVN with this command:
|
Currently, the gtest.framework discussed here isn't available in a tagged release of Google Test, it is only available in the trunk. As explained at the Google Test [site](https://github.com/google/googletest), you can get the code from anonymous SVN with this command:
|
||||||
|
|
||||||
```
|
```
|
||||||
svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only
|
svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only
|
||||||
@ -28,7 +28,7 @@ Alternatively, if you are working with Subversion in your own code base, you can
|
|||||||
|
|
||||||
To use `svn:externals`, decide where you would like to have the external source reside. You might choose to put the external source inside the trunk, because you want it to be part of the branch when you make a release. However, keeping it outside the trunk in a version-tagged directory called something like `third-party/googletest/1.0.1`, is another option. Once the location is established, use `svn propedit svn:externals _directory_` to set the svn:externals property on a directory in your repository. This directory won't contain the code, but be its versioned parent directory.
|
To use `svn:externals`, decide where you would like to have the external source reside. You might choose to put the external source inside the trunk, because you want it to be part of the branch when you make a release. However, keeping it outside the trunk in a version-tagged directory called something like `third-party/googletest/1.0.1`, is another option. Once the location is established, use `svn propedit svn:externals _directory_` to set the svn:externals property on a directory in your repository. This directory won't contain the code, but be its versioned parent directory.
|
||||||
|
|
||||||
The command `svn propedit` will bring up your Subversion editor, making editing the long, (potentially multi-line) property simpler. This same method can be used to check out a tagged branch, by using the appropriate URL (e.g. `http://googletest.googlecode.com/svn/tags/release-1.0.1`). Additionally, the svn:externals property allows the specification of a particular revision of the trunk with the `-r_##_` option (e.g. `externals/src/googletest -r60 http://googletest.googlecode.com/svn/trunk`).
|
The command `svn propedit` will bring up your Subversion editor, making editing the long, (potentially multi-line) property simpler. This same method can be used to check out a tagged branch, by using the appropriate URL (e.g. `https://github.com/google/googletest/releases/tag/release-1.0.1`). Additionally, the svn:externals property allows the specification of a particular revision of the trunk with the `-r_##_` option (e.g. `externals/src/googletest -r60 http://googletest.googlecode.com/svn/trunk`).
|
||||||
|
|
||||||
Here is an example of using the svn:externals properties on a trunk (read via `svn propget`) of a project. This value checks out a copy of Google Test into the `trunk/externals/src/googletest/` directory.
|
Here is an example of using the svn:externals properties on a trunk (read via `svn propget`) of a project. This value checks out a copy of Google Test into the `trunk/externals/src/googletest/` directory.
|
||||||
|
|
||||||
@ -90,4 +90,4 @@ The Debugger has exited with status 0.
|
|||||||
|
|
||||||
# Summary #
|
# Summary #
|
||||||
|
|
||||||
Unit testing is a valuable way to ensure your data model stays valid even during rapid development or refactoring. The Google Testing Framework is a great unit testing framework for C and C++ which integrates well with an Xcode development environment.
|
Unit testing is a valuable way to ensure your data model stays valid even during rapid development or refactoring. The Google Testing Framework is a great unit testing framework for C and C++ which integrates well with an Xcode development environment.
|
||||||
|
@ -154,7 +154,7 @@ c is 10
|
|||||||
> `ASSERT_PRED*` or `EXPECT_PRED*`, please see
|
> `ASSERT_PRED*` or `EXPECT_PRED*`, please see
|
||||||
> [this](faq#OverloadedPredicate) for how to resolve it.
|
> [this](faq#OverloadedPredicate) for how to resolve it.
|
||||||
> 1. Currently we only provide predicate assertions of arity <= 5. If you need
|
> 1. Currently we only provide predicate assertions of arity <= 5. If you need
|
||||||
> a higher-arity assertion, let [us](http://g/opensource-gtest) know.
|
> a higher-arity assertion, let [us](https://github.com/google/googletest/issues) know.
|
||||||
|
|
||||||
**Availability**: Linux, Windows, Mac.
|
**Availability**: Linux, Windows, Mac.
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ Verifies that `val1` is less than, or almost equal to, `val2`. You can replace
|
|||||||
|
|
||||||
### Asserting Using gMock Matchers
|
### Asserting Using gMock Matchers
|
||||||
|
|
||||||
Google-developed C++ mocking framework [gMock](http://go/gmock) comes with a
|
Google-developed C++ mocking framework [gMock](../../googlemock) comes with a
|
||||||
library of matchers for validating arguments passed to mock objects. A gMock
|
library of matchers for validating arguments passed to mock objects. A gMock
|
||||||
*matcher* is basically a predicate that knows how to describe itself. It can be
|
*matcher* is basically a predicate that knows how to describe itself. It can be
|
||||||
used in these assertion macros:
|
used in these assertion macros:
|
||||||
@ -402,17 +402,17 @@ using ::testing::StartsWith;
|
|||||||
EXPECT_THAT(Foo(), StartsWith("Hello"));
|
EXPECT_THAT(Foo(), StartsWith("Hello"));
|
||||||
```
|
```
|
||||||
|
|
||||||
Read this [recipe](http://go/gmockguide#using-matchers-in-gunit-assertions) in
|
Read this [recipe](../../googlemock/docs/CookBook.md#using-matchers-in-google-test-assertions) in
|
||||||
the gMock Cookbook for more details.
|
the gMock Cookbook for more details.
|
||||||
|
|
||||||
gMock has a rich set of matchers. You can do many things googletest cannot do
|
gMock has a rich set of matchers. You can do many things googletest cannot do
|
||||||
alone with them. For a list of matchers gMock provides, read
|
alone with them. For a list of matchers gMock provides, read
|
||||||
[this](http://go/gmockguide#using-matchers). Especially useful among them are
|
[this](../../googlemock/docs/CookBook.md#using-matchers). Especially useful among them are
|
||||||
some [protocol buffer matchers](http://go/protomatchers). It's easy to write
|
some [protocol buffer matchers](https://github.com/google/nucleus/blob/master/nucleus/testing/protocol-buffer-matchers.h). It's easy to write
|
||||||
your [own matchers](http://go/gmockguide#NewMatchers) too.
|
your [own matchers](../../googlemock/docs/CookBook.md#writing-new-matchers-quickly) too.
|
||||||
|
|
||||||
For example, you can use gMock's
|
For example, you can use gMock's
|
||||||
[EqualsProto](http://cs/#piper///depot/google3/testing/base/public/gmock_utils/protocol-buffer-matchers.h)
|
[EqualsProto](https://github.com/google/nucleus/blob/master/nucleus/testing/protocol-buffer-matchers.h)
|
||||||
to compare protos in your tests:
|
to compare protos in your tests:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
@ -433,7 +433,7 @@ and you're ready to go.
|
|||||||
|
|
||||||
(Please read the [previous](#AssertThat) section first if you haven't.)
|
(Please read the [previous](#AssertThat) section first if you haven't.)
|
||||||
|
|
||||||
You can use the gMock [string matchers](http://go/gmockguide#string-matchers)
|
You can use the gMock [string matchers](../../googlemock/docs/CheatSheet.md#string-matchers)
|
||||||
with `EXPECT_THAT()` or `ASSERT_THAT()` to do more string comparison tricks
|
with `EXPECT_THAT()` or `ASSERT_THAT()` to do more string comparison tricks
|
||||||
(sub-string, prefix, suffix, regular expression, and etc). For example,
|
(sub-string, prefix, suffix, regular expression, and etc). For example,
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ result, any in-memory side effects they incur are observable in their respective
|
|||||||
sub-processes, but not in the parent process. You can think of them as running
|
sub-processes, but not in the parent process. You can think of them as running
|
||||||
in a parallel universe, more or less.
|
in a parallel universe, more or less.
|
||||||
|
|
||||||
In particular, if you use [gMock](http://go/gmock) and the death test statement
|
In particular, if you use [gMock](../../googlemock) and the death test statement
|
||||||
invokes some mock methods, the parent process will think the calls have never
|
invokes some mock methods, the parent process will think the calls have never
|
||||||
occurred. Therefore, you may want to move your `EXPECT_CALL` statements inside
|
occurred. Therefore, you may want to move your `EXPECT_CALL` statements inside
|
||||||
the `EXPECT_DEATH` macro.
|
the `EXPECT_DEATH` macro.
|
||||||
@ -289,7 +289,7 @@ Please make sure you have read [this](advanced.md#how-it-works).
|
|||||||
|
|
||||||
In particular, death tests don't like having multiple threads in the parent
|
In particular, death tests don't like having multiple threads in the parent
|
||||||
process. So the first thing you can try is to eliminate creating threads outside
|
process. So the first thing you can try is to eliminate creating threads outside
|
||||||
of `EXPECT_DEATH()`. For example, you may want to use [mocks](http://go/gmock)
|
of `EXPECT_DEATH()`. For example, you may want to use [mocks](../../googlemock)
|
||||||
or fake objects instead of real ones in your tests.
|
or fake objects instead of real ones in your tests.
|
||||||
|
|
||||||
Sometimes this is impossible as some library you must use may be creating
|
Sometimes this is impossible as some library you must use may be creating
|
||||||
@ -704,7 +704,7 @@ mistake in production. Such cleverness also leads to
|
|||||||
advise against the practice, and googletest doesn't provide a way to do it.
|
advise against the practice, and googletest doesn't provide a way to do it.
|
||||||
|
|
||||||
In general, the recommended way to cause the code to behave differently under
|
In general, the recommended way to cause the code to behave differently under
|
||||||
test is [Dependency Injection](http://go/dependency-injection). You can inject
|
test is [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection). You can inject
|
||||||
different functionality from the test and from the production code. Since your
|
different functionality from the test and from the production code. Since your
|
||||||
production code doesn't link in the for-test logic at all (the
|
production code doesn't link in the for-test logic at all (the
|
||||||
[`testonly`](http://go/testonly) attribute for BUILD targets helps to ensure
|
[`testonly`](http://go/testonly) attribute for BUILD targets helps to ensure
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
*googletest* helps you write better C++ tests.
|
*googletest* helps you write better C++ tests.
|
||||||
|
|
||||||
googletest is a testing framework developed by the [Testing
|
googletest is a testing framework developed by the Testing
|
||||||
Technology](http://engdoc/eng/testing/TT/) team with Google's specific
|
Technology team with Google's specific
|
||||||
requirements and constraints in mind. No matter whether you work on Linux,
|
requirements and constraints in mind. No matter whether you work on Linux,
|
||||||
Windows, or a Mac, if you write C++ code, googletest can help you. And it
|
Windows, or a Mac, if you write C++ code, googletest can help you. And it
|
||||||
supports *any* kind of tests, not just unit tests.
|
supports *any* kind of tests, not just unit tests.
|
||||||
@ -75,7 +75,7 @@ the terms:
|
|||||||
Meaning | googletest Term | [ISTQB](http://www.istqb.org/) Term
|
Meaning | googletest Term | [ISTQB](http://www.istqb.org/) Term
|
||||||
:----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------- | :----------------------------------
|
:----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------- | :----------------------------------
|
||||||
Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case](http://glossary.istqb.org/search/test%20case)
|
Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case](http://glossary.istqb.org/search/test%20case)
|
||||||
A set of several tests related to one component | [TestCase](https://g3doc.corp.google.com/third_party/googletest/googletest/g3doc/primer.md#basic-concepts) | [TestSuite](http://glossary.istqb.org/search/test%20suite)
|
A set of several tests related to one component | [TestCase](#basic-concepts) | [TestSuite](http://glossary.istqb.org/search/test%20suite)
|
||||||
|
|
||||||
## Basic Concepts
|
## Basic Concepts
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@
|
|||||||
#if GTEST_LANG_CXX11
|
#if GTEST_LANG_CXX11
|
||||||
# define GTEST_HAS_STD_TUPLE_ 1
|
# define GTEST_HAS_STD_TUPLE_ 1
|
||||||
# if defined(__clang__)
|
# if defined(__clang__)
|
||||||
// Inspired by http://clang.llvm.org/docs/LanguageExtensions.html#__has_include
|
// Inspired by https://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros
|
||||||
# if defined(__has_include) && !__has_include(<tuple>)
|
# if defined(__has_include) && !__has_include(<tuple>)
|
||||||
# undef GTEST_HAS_STD_TUPLE_
|
# undef GTEST_HAS_STD_TUPLE_
|
||||||
# endif
|
# endif
|
||||||
@ -391,7 +391,7 @@
|
|||||||
# elif defined(__GLIBCXX__)
|
# elif defined(__GLIBCXX__)
|
||||||
// Inspired by boost/config/stdlib/libstdcpp3.hpp,
|
// Inspired by boost/config/stdlib/libstdcpp3.hpp,
|
||||||
// http://gcc.gnu.org/gcc-4.2/changes.html and
|
// http://gcc.gnu.org/gcc-4.2/changes.html and
|
||||||
// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
|
// https://web.archive.org/web/20140227044429/gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
|
||||||
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
|
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
|
||||||
# undef GTEST_HAS_STD_TUPLE_
|
# undef GTEST_HAS_STD_TUPLE_
|
||||||
# endif
|
# endif
|
||||||
@ -1799,7 +1799,7 @@ class GTEST_API_ Mutex {
|
|||||||
// Initializes owner_thread_id_ and critical_section_ in static mutexes.
|
// Initializes owner_thread_id_ and critical_section_ in static mutexes.
|
||||||
void ThreadSafeLazyInit();
|
void ThreadSafeLazyInit();
|
||||||
|
|
||||||
// Per http://blogs.msdn.com/b/oldnewthing/archive/2004/02/23/78395.aspx,
|
// Per https://blogs.msdn.microsoft.com/oldnewthing/20040223-00/?p=40503,
|
||||||
// we assume that 0 is an invalid value for thread IDs.
|
// we assume that 0 is an invalid value for thread IDs.
|
||||||
unsigned int owner_thread_id_;
|
unsigned int owner_thread_id_;
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ class AbstractRpcServer(object):
|
|||||||
The authentication process works as follows:
|
The authentication process works as follows:
|
||||||
1) We get a username and password from the user
|
1) We get a username and password from the user
|
||||||
2) We use ClientLogin to obtain an AUTH token for the user
|
2) We use ClientLogin to obtain an AUTH token for the user
|
||||||
(see http://code.google.com/apis/accounts/AuthForInstalledApps.html).
|
(see https://developers.google.com/identity/protocols/AuthForInstalledApps).
|
||||||
3) We pass the auth token to /_ah/login on the server to obtain an
|
3) We pass the auth token to /_ah/login on the server to obtain an
|
||||||
authentication cookie. If login was successful, it tries to redirect
|
authentication cookie. If login was successful, it tries to redirect
|
||||||
us to the URL we provided.
|
us to the URL we provided.
|
||||||
@ -506,7 +506,7 @@ def EncodeMultipartFormData(fields, files):
|
|||||||
(content_type, body) ready for httplib.HTTP instance.
|
(content_type, body) ready for httplib.HTTP instance.
|
||||||
|
|
||||||
Source:
|
Source:
|
||||||
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
|
https://web.archive.org/web/20160116052001/code.activestate.com/recipes/146306
|
||||||
"""
|
"""
|
||||||
BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
|
BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
|
||||||
CRLF = '\r\n'
|
CRLF = '\r\n'
|
||||||
@ -807,7 +807,7 @@ class SubversionVCS(VersionControlSystem):
|
|||||||
# svn cat translates keywords but svn diff doesn't. As a result of this
|
# svn cat translates keywords but svn diff doesn't. As a result of this
|
||||||
# behavior patching.PatchChunks() fails with a chunk mismatch error.
|
# behavior patching.PatchChunks() fails with a chunk mismatch error.
|
||||||
# This part was originally written by the Review Board development team
|
# This part was originally written by the Review Board development team
|
||||||
# who had the same problem (http://reviews.review-board.org/r/276/).
|
# who had the same problem (https://reviews.reviewboard.org/r/276/).
|
||||||
# Mapping of keywords to known aliases
|
# Mapping of keywords to known aliases
|
||||||
svn_keywords = {
|
svn_keywords = {
|
||||||
# Standard keywords
|
# Standard keywords
|
||||||
@ -860,7 +860,7 @@ class SubversionVCS(VersionControlSystem):
|
|||||||
status_lines = status.splitlines()
|
status_lines = status.splitlines()
|
||||||
# If file is in a cl, the output will begin with
|
# If file is in a cl, the output will begin with
|
||||||
# "\n--- Changelist 'cl_name':\n". See
|
# "\n--- Changelist 'cl_name':\n". See
|
||||||
# http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt
|
# https://web.archive.org/web/20090918234815/svn.collab.net/repos/svn/trunk/notes/changelist-design.txt
|
||||||
if (len(status_lines) == 3 and
|
if (len(status_lines) == 3 and
|
||||||
not status_lines[0] and
|
not status_lines[0] and
|
||||||
status_lines[1].startswith("--- Changelist")):
|
status_lines[1].startswith("--- Changelist")):
|
||||||
|
@ -264,7 +264,7 @@ Mutex::~Mutex() {
|
|||||||
// to clean them up.
|
// to clean them up.
|
||||||
// TODO(yukawa): Switch to Slim Reader/Writer (SRW) Locks, which requires
|
// TODO(yukawa): Switch to Slim Reader/Writer (SRW) Locks, which requires
|
||||||
// nothing to clean it up but is available only on Vista and later.
|
// nothing to clean it up but is available only on Vista and later.
|
||||||
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa904937.aspx
|
// https://docs.microsoft.com/en-us/windows/desktop/Sync/slim-reader-writer--srw--locks
|
||||||
if (type_ == kDynamic) {
|
if (type_ == kDynamic) {
|
||||||
::DeleteCriticalSection(critical_section_);
|
::DeleteCriticalSection(critical_section_);
|
||||||
delete critical_section_;
|
delete critical_section_;
|
||||||
|
@ -784,7 +784,7 @@ static void TestExitMacros() {
|
|||||||
|
|
||||||
// Of all signals effects on the process exit code, only those of SIGABRT
|
// Of all signals effects on the process exit code, only those of SIGABRT
|
||||||
// are documented on Windows.
|
// are documented on Windows.
|
||||||
// See http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx.
|
// See https://msdn.microsoft.com/en-us/query-bi/m/dwwzkt4c.
|
||||||
EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), "") << "b_ar";
|
EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), "") << "b_ar";
|
||||||
|
|
||||||
# elif !GTEST_OS_FUCHSIA
|
# elif !GTEST_OS_FUCHSIA
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// examples. It is set in the "Based On:" dropdown in the "Project" info
|
// examples. It is set in the "Based On:" dropdown in the "Project" info
|
||||||
// dialog.
|
// dialog.
|
||||||
// This file is based on the Xcode Configuration files in:
|
// This file is based on the Xcode Configuration files in:
|
||||||
// http://code.google.com/p/google-toolbox-for-mac/
|
// https://github.com/google/google-toolbox-for-mac
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "General.xcconfig"
|
#include "General.xcconfig"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// These are Framework target settings for the gtest framework and examples. It
|
// These are Framework target settings for the gtest framework and examples. It
|
||||||
// is set in the "Based On:" dropdown in the "Target" info dialog.
|
// is set in the "Based On:" dropdown in the "Target" info dialog.
|
||||||
// This file is based on the Xcode Configuration files in:
|
// This file is based on the Xcode Configuration files in:
|
||||||
// http://code.google.com/p/google-toolbox-for-mac/
|
// https://github.com/google/google-toolbox-for-mac
|
||||||
//
|
//
|
||||||
|
|
||||||
// Dynamic libs need to be position independent
|
// Dynamic libs need to be position independent
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// These are General configuration settings for the gtest framework and
|
// These are General configuration settings for the gtest framework and
|
||||||
// examples.
|
// examples.
|
||||||
// This file is based on the Xcode Configuration files in:
|
// This file is based on the Xcode Configuration files in:
|
||||||
// http://code.google.com/p/google-toolbox-for-mac/
|
// https://github.com/google/google-toolbox-for-mac
|
||||||
//
|
//
|
||||||
|
|
||||||
// Build for PPC and Intel, 32- and 64-bit
|
// Build for PPC and Intel, 32- and 64-bit
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// and examples. It is set in the "Based On:" dropdown in the "Project" info
|
// and examples. It is set in the "Based On:" dropdown in the "Project" info
|
||||||
// dialog.
|
// dialog.
|
||||||
// This file is based on the Xcode Configuration files in:
|
// This file is based on the Xcode Configuration files in:
|
||||||
// http://code.google.com/p/google-toolbox-for-mac/
|
// https://github.com/google/google-toolbox-for-mac
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "General.xcconfig"
|
#include "General.xcconfig"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// These are static library target settings for libgtest.a. It
|
// These are static library target settings for libgtest.a. It
|
||||||
// is set in the "Based On:" dropdown in the "Target" info dialog.
|
// is set in the "Based On:" dropdown in the "Target" info dialog.
|
||||||
// This file is based on the Xcode Configuration files in:
|
// This file is based on the Xcode Configuration files in:
|
||||||
// http://code.google.com/p/google-toolbox-for-mac/
|
// https://github.com/google/google-toolbox-for-mac
|
||||||
//
|
//
|
||||||
|
|
||||||
// Static libs can be included in bundles so make them position independent
|
// Static libs can be included in bundles so make them position independent
|
||||||
|
Loading…
Reference in New Issue
Block a user