Fixed typos

This commit is contained in:
Troy Holsapple 2018-02-07 22:06:00 -08:00
parent a3c73ed28d
commit c8510504dd
14 changed files with 27 additions and 27 deletions

View File

@ -1231,7 +1231,7 @@ that references the implementation object dies, the implementation
object will be deleted. object will be deleted.
Therefore, if you have some complex matcher that you want to use again Therefore, if you have some complex matcher that you want to use again
and again, there is no need to build it everytime. Just assign it to a and again, there is no need to build it every time. Just assign it to a
matcher variable and use that variable repeatedly! For example, matcher variable and use that variable repeatedly! For example,
``` ```
@ -1403,7 +1403,7 @@ edge from node A to node B wherever A must occur before B, we can get
a DAG. We use the term "sequence" to mean a directed path in this a DAG. We use the term "sequence" to mean a directed path in this
DAG. Now, if we decompose the DAG into sequences, we just need to know DAG. Now, if we decompose the DAG into sequences, we just need to know
which sequences each `EXPECT_CALL()` belongs to in order to be able to which sequences each `EXPECT_CALL()` belongs to in order to be able to
reconstruct the orginal DAG. reconstruct the original DAG.
So, to specify the partial order on the expectations we need to do two So, to specify the partial order on the expectations we need to do two
things: first to define some `Sequence` objects, and then for each things: first to define some `Sequence` objects, and then for each
@ -2182,7 +2182,7 @@ the implementation object dies, the implementation object will be
deleted. deleted.
If you have some complex action that you want to use again and again, If you have some complex action that you want to use again and again,
you may not have to build it from scratch everytime. If the action you may not have to build it from scratch every time. If the action
doesn't have an internal state (i.e. if it always does the same thing doesn't have an internal state (i.e. if it always does the same thing
no matter how many times it has been called), you can assign it to an no matter how many times it has been called), you can assign it to an
action variable and use that variable repeatedly. For example: action variable and use that variable repeatedly. For example:

View File

@ -1550,7 +1550,7 @@ class BothOfMatcherImpl : public MatcherInterface<T> {
// MatcherList provides mechanisms for storing a variable number of matchers in // MatcherList provides mechanisms for storing a variable number of matchers in
// a list structure (ListType) and creating a combining matcher from such a // a list structure (ListType) and creating a combining matcher from such a
// list. // list.
// The template is defined recursively using the following template paramters: // The template is defined recursively using the following template parameters:
// * kSize is the length of the MatcherList. // * kSize is the length of the MatcherList.
// * Head is the type of the first matcher of the list. // * Head is the type of the first matcher of the list.
// * Tail denotes the types of the remaining matchers of the list. // * Tail denotes the types of the remaining matchers of the list.
@ -2379,7 +2379,7 @@ class ResultOfMatcher {
private: private:
// Functors often define operator() as non-const method even though // Functors often define operator() as non-const method even though
// they are actualy stateless. But we need to use them even when // they are actually stateless. But we need to use them even when
// 'this' is a const pointer. It's the user's responsibility not to // 'this' is a const pointer. It's the user's responsibility not to
// use stateful callables with ResultOf(), which does't guarantee // use stateful callables with ResultOf(), which does't guarantee
// how many times the callable will be invoked. // how many times the callable will be invoked.

View File

@ -338,7 +338,7 @@ class Class(_GenericDeclaration):
# TODO(nnorwitz): handle namespaces, etc. # TODO(nnorwitz): handle namespaces, etc.
if self.bases: if self.bases:
for token_list in self.bases: for token_list in self.bases:
# TODO(nnorwitz): bases are tokens, do name comparision. # TODO(nnorwitz): bases are tokens, do name comparison.
for token in token_list: for token in token_list:
if token.name == node.name: if token.name == node.name:
return True return True
@ -381,7 +381,7 @@ class Function(_GenericDeclaration):
def Requires(self, node): def Requires(self, node):
if self.parameters: if self.parameters:
# TODO(nnorwitz): parameters are tokens, do name comparision. # TODO(nnorwitz): parameters are tokens, do name comparison.
for p in self.parameters: for p in self.parameters:
if p.name == node.name: if p.name == node.name:
return True return True
@ -858,7 +858,7 @@ class AstBuilder(object):
last_token = self._GetNextToken() last_token = self._GetNextToken()
return tokens, last_token return tokens, last_token
# TODO(nnorwitz): remove _IgnoreUpTo() it shouldn't be necesary. # TODO(nnorwitz): remove _IgnoreUpTo() it shouldn't be necessary.
def _IgnoreUpTo(self, token_type, token): def _IgnoreUpTo(self, token_type, token):
unused_tokens = self._GetTokensUpTo(token_type, token) unused_tokens = self._GetTokensUpTo(token_type, token)

View File

@ -751,7 +751,7 @@ TEST(DoDefaultDeathTest, DiesIfUsedInCompositeAction) {
} }
// Tests that DoDefault() returns the default value set by // Tests that DoDefault() returns the default value set by
// DefaultValue<T>::Set() when it's not overriden by an ON_CALL(). // DefaultValue<T>::Set() when it's not overridden by an ON_CALL().
TEST(DoDefaultTest, ReturnsUserSpecifiedPerTypeDefaultValueWhenThereIsOne) { TEST(DoDefaultTest, ReturnsUserSpecifiedPerTypeDefaultValueWhenThereIsOne) {
DefaultValue<int>::Set(1); DefaultValue<int>::Set(1);
MockClass mock; MockClass mock;

View File

@ -915,7 +915,7 @@ TEST(TypedEqTest, CanDescribeSelf) {
// Type<T>::IsTypeOf(v) compiles iff the type of value v is T, where T // Type<T>::IsTypeOf(v) compiles iff the type of value v is T, where T
// is a "bare" type (i.e. not in the form of const U or U&). If v's // is a "bare" type (i.e. not in the form of const U or U&). If v's
// type is not T, the compiler will generate a message about // type is not T, the compiler will generate a message about
// "undefined referece". // "undefined reference".
template <typename T> template <typename T>
struct Type { struct Type {
static bool IsTypeOf(const T& /* v */) { return true; } static bool IsTypeOf(const T& /* v */) { return true; }
@ -1424,7 +1424,7 @@ TEST(PairTest, MatchesCorrectly) {
EXPECT_THAT(p, Pair(25, "foo")); EXPECT_THAT(p, Pair(25, "foo"));
EXPECT_THAT(p, Pair(Ge(20), HasSubstr("o"))); EXPECT_THAT(p, Pair(Ge(20), HasSubstr("o")));
// 'first' doesnt' match, but 'second' matches. // 'first' does not match, but 'second' matches.
EXPECT_THAT(p, Not(Pair(42, "foo"))); EXPECT_THAT(p, Not(Pair(42, "foo")));
EXPECT_THAT(p, Not(Pair(Lt(25), "foo"))); EXPECT_THAT(p, Not(Pair(Lt(25), "foo")));
@ -4263,7 +4263,7 @@ TYPED_TEST(ContainerEqTest, DuplicateDifference) {
#endif // GTEST_HAS_TYPED_TEST #endif // GTEST_HAS_TYPED_TEST
// Tests that mutliple missing values are reported. // Tests that mutliple missing values are reported.
// Using just vector here, so order is predicatble. // Using just vector here, so order is predictable.
TEST(ContainerEqExtraTest, MultipleValuesMissing) { TEST(ContainerEqExtraTest, MultipleValuesMissing) {
static const int vals[] = {1, 1, 2, 3, 5, 8}; static const int vals[] = {1, 1, 2, 3, 5, 8};
static const int test_vals[] = {2, 1, 5}; static const int test_vals[] = {2, 1, 5};
@ -4276,7 +4276,7 @@ TEST(ContainerEqExtraTest, MultipleValuesMissing) {
} }
// Tests that added values are reported. // Tests that added values are reported.
// Using just vector here, so order is predicatble. // Using just vector here, so order is predictable.
TEST(ContainerEqExtraTest, MultipleValuesAdded) { TEST(ContainerEqExtraTest, MultipleValuesAdded) {
static const int vals[] = {1, 1, 2, 3, 5, 8}; static const int vals[] = {1, 1, 2, 3, 5, 8};
static const int test_vals[] = {1, 2, 92, 3, 5, 8, 46}; static const int test_vals[] = {1, 2, 92, 3, 5, 8, 46};

View File

@ -460,7 +460,7 @@ following benefits:
You may still want to use `SetUp()/TearDown()` in the following rare cases: You may still want to use `SetUp()/TearDown()` in the following rare cases:
* If the tear-down operation could throw an exception, you must use `TearDown()` as opposed to the destructor, as throwing in a destructor leads to undefined behavior and usually will kill your program right away. Note that many standard libraries (like STL) may throw when exceptions are enabled in the compiler. Therefore you should prefer `TearDown()` if you want to write portable tests that work with or without exceptions. * If the tear-down operation could throw an exception, you must use `TearDown()` as opposed to the destructor, as throwing in a destructor leads to undefined behavior and usually will kill your program right away. Note that many standard libraries (like STL) may throw when exceptions are enabled in the compiler. Therefore you should prefer `TearDown()` if you want to write portable tests that work with or without exceptions.
* The assertion macros throw an exception when flag `--gtest_throw_on_failure` is specified. Therefore, you shouldn't use Google Test assertions in a destructor if you plan to run your tests with this flag. * The assertion macros throw an exception when flag `--gtest_throw_on_failure` is specified. Therefore, you shouldn't use Google Test assertions in a destructor if you plan to run your tests with this flag.
* In a constructor or destructor, you cannot make a virtual function call on this object. (You can call a method declared as virtual, but it will be statically bound.) Therefore, if you need to call a method that will be overriden in a derived class, you have to use `SetUp()/TearDown()`. * In a constructor or destructor, you cannot make a virtual function call on this object. (You can call a method declared as virtual, but it will be statically bound.) Therefore, if you need to call a method that will be overridden in a derived class, you have to use `SetUp()/TearDown()`.
## The compiler complains "no matching function to call" when I use ASSERT\_PREDn. How do I fix it? ## ## The compiler complains "no matching function to call" when I use ASSERT\_PREDn. How do I fix it? ##

View File

@ -191,7 +191,7 @@ class GTEST_API_ FilePath {
void Normalize(); void Normalize();
// Returns a pointer to the last occurence of a valid path separator in // Returns a pointer to the last ioccurrence of a valid path separator in
// the FilePath. On Windows, for example, both '/' and '\' are valid path // the FilePath. On Windows, for example, both '/' and '\' are valid path
// separators. Returns NULL if no path separator was found. // separators. Returns NULL if no path separator was found.
const char* FindLastPathSeparator() const; const char* FindLastPathSeparator() const;

View File

@ -128,7 +128,7 @@ FilePath FilePath::RemoveExtension(const char* extension) const {
return *this; return *this;
} }
// Returns a pointer to the last occurence of a valid path separator in // Returns a pointer to the last occurrence of a valid path separator in
// the FilePath. On Windows, for example, both '/' and '\' are valid path // the FilePath. On Windows, for example, both '/' and '\' are valid path
// separators. Returns NULL if no path separator was found. // separators. Returns NULL if no path separator was found.
const char* FilePath::FindLastPathSeparator() const { const char* FilePath::FindLastPathSeparator() const {

View File

@ -124,7 +124,7 @@ namespace internal {
// Depending on the value of a char (or wchar_t), we print it in one // Depending on the value of a char (or wchar_t), we print it in one
// of three formats: // of three formats:
// - as is if it's a printable ASCII (e.g. 'a', '2', ' '), // - as is if it's a printable ASCII (e.g. 'a', '2', ' '),
// - as a hexidecimal escape sequence (e.g. '\x7F'), or // - as a hexadecimal escape sequence (e.g. '\x7F'), or
// - as a special escape sequence (e.g. '\r', '\n'). // - as a special escape sequence (e.g. '\r', '\n').
enum CharFormat { enum CharFormat {
kAsIs, kAsIs,
@ -231,7 +231,7 @@ void PrintCharAndCodeTo(Char c, ostream* os) {
return; return;
*os << " (" << static_cast<int>(c); *os << " (" << static_cast<int>(c);
// For more convenience, we print c's code again in hexidecimal, // For more convenience, we print c's code again in hexadecimal,
// unless c was already printed in the form '\x##' or the code is in // unless c was already printed in the form '\x##' or the code is in
// [1, 9]. // [1, 9].
if (format == kHexEscape || (1 <= c && c <= 9)) { if (format == kHexEscape || (1 <= c && c <= 9)) {

View File

@ -1718,7 +1718,7 @@ AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT
// Utility functions for encoding Unicode text (wide strings) in // Utility functions for encoding Unicode text (wide strings) in
// UTF-8. // UTF-8.
// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8 // A Unicode code-point can have up to 21 bits, and is encoded in UTF-8
// like this: // like this:
// //
// Code-point length Encoding // Code-point length Encoding

View File

@ -1327,7 +1327,7 @@ TEST(FormatForComparisonFailureMessageTest, FormatsNonCharArrayAsPointer) {
} }
// Tests formatting a char pointer when it's compared with another pointer. // Tests formatting a char pointer when it's compared with another pointer.
// In this case we want to print it as a raw pointer, as the comparision is by // In this case we want to print it as a raw pointer, as the comparison is by
// pointer. // pointer.
// char pointer vs pointer // char pointer vs pointer

View File

@ -227,7 +227,7 @@ class Subprocess:
combined in a string. combined in a string.
""" """
# The subprocess module is the preferrable way of running programs # The subprocess module is the preferable way of running programs
# since it is available and behaves consistently on all platforms, # since it is available and behaves consistently on all platforms,
# including Windows. But it is only available starting in python 2.4. # including Windows. But it is only available starting in python 2.4.
# In earlier python versions, we revert to the popen2 module, which is # In earlier python versions, we revert to the popen2 module, which is

View File

@ -538,7 +538,7 @@ TEST(CodePointToUtf8Test, CanEncode8To11Bits) {
// 101 0111 0110 => 110-10101 10-110110 // 101 0111 0110 => 110-10101 10-110110
// Some compilers (e.g., GCC on MinGW) cannot handle non-ASCII codepoints // Some compilers (e.g., GCC on MinGW) cannot handle non-ASCII codepoints
// in wide strings and wide chars. In order to accomodate them, we have to // in wide strings and wide chars. In order to accommodate them, we have to
// introduce such character constants as integers. // introduce such character constants as integers.
EXPECT_EQ("\xD5\xB6", EXPECT_EQ("\xD5\xB6",
CodePointToUtf8(static_cast<wchar_t>(0x576))); CodePointToUtf8(static_cast<wchar_t>(0x576)));
@ -1779,7 +1779,7 @@ TEST(Int32FromEnvOrDieDeathTest, AbortsOnFailure) {
} }
// Tests that Int32FromEnvOrDie() aborts with an error message // Tests that Int32FromEnvOrDie() aborts with an error message
// if the variable cannot be represnted by an Int32. // if the variable cannot be represented by an Int32.
TEST(Int32FromEnvOrDieDeathTest, AbortsOnInt32Overflow) { TEST(Int32FromEnvOrDieDeathTest, AbortsOnInt32Overflow) {
SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "1234567891234567891234"); SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "1234567891234567891234");
EXPECT_DEATH_IF_SUPPORTED( EXPECT_DEATH_IF_SUPPORTED(
@ -3658,7 +3658,7 @@ TEST(AssertionTest, AssertFalseWithAssertionResult) {
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
// Restores warnings after previous "#pragma option push" supressed them // Restores warnings after previous "#pragma option push" suppressed them
# pragma option pop # pragma option pop
#endif #endif
@ -4384,7 +4384,7 @@ TEST(ExpectTest, ExpectFalseWithAssertionResult) {
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
// Restores warnings after previous "#pragma option push" supressed them // Restores warnings after previous "#pragma option push" suppressed them
# pragma option pop # pragma option pop
#endif #endif
@ -6642,7 +6642,7 @@ TEST(StreamingAssertionsTest, Truth2) {
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
// Restores warnings after previous "#pragma option push" supressed them // Restores warnings after previous "#pragma option push" suppressed them
# pragma option pop # pragma option pop
#endif #endif

View File

@ -29,7 +29,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""A script to prepare version informtion for use the gtest Info.plist file. """A script to prepare version information for use the gtest Info.plist file.
This script extracts the version information from the configure.ac file and This script extracts the version information from the configure.ac file and
uses it to generate a header file containing the same information. The uses it to generate a header file containing the same information. The