diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 8 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 2 | ||||
-rw-r--r-- | googlemock/test/gmock-generated-actions_test.cc | 2 | ||||
-rw-r--r-- | googletest/docs/AdvancedGuide.md | 4 | ||||
-rw-r--r-- | googletest/docs/Primer.md | 2 | ||||
-rw-r--r-- | googletest/docs/V1_7_Primer.md | 1 | ||||
-rw-r--r-- | googletest/samples/sample3_unittest.cc | 2 | ||||
-rw-r--r-- | googletest/src/gtest.cc | 3 |
9 files changed, 14 insertions, 11 deletions
@@ -60,6 +60,7 @@ the following notable projects: * [Protocol Buffers](https://github.com/google/protobuf), Google's data interchange format. * The [OpenCV](http://opencv.org/) computer vision library. + * [tiny-dnn](https://github.com/tiny-dnn/tiny-dnn): header only, dependency-free deep learning framework in C++11 ## Related Open Source Projects ## diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index b3f654af..845c8232 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -1029,9 +1029,9 @@ class DoBothAction { // return sqrt(x*x + y*y); // } // ... -// EXEPCT_CALL(mock, Foo("abc", _, _)) +// EXPECT_CALL(mock, Foo("abc", _, _)) // .WillOnce(Invoke(DistanceToOriginWithLabel)); -// EXEPCT_CALL(mock, Bar(5, _, _)) +// EXPECT_CALL(mock, Bar(5, _, _)) // .WillOnce(Invoke(DistanceToOriginWithIndex)); // // you could write @@ -1041,8 +1041,8 @@ class DoBothAction { // return sqrt(x*x + y*y); // } // ... -// EXEPCT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin)); -// EXEPCT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin)); +// EXPECT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin)); +// EXPECT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin)); typedef internal::IgnoredValue Unused; // This constructor allows us to turn an Action<From> object into an diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 9ade5b64..3a97c438 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -646,7 +646,7 @@ class SafeMatcherCastImpl { // type U. GTEST_COMPILE_ASSERT_( internal::is_reference<T>::value || !internal::is_reference<U>::value, - cannot_convert_non_referentce_arg_to_reference); + cannot_convert_non_reference_arg_to_reference); // In case both T and U are arithmetic types, enforce that the // conversion is not lossy. typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT; diff --git a/googlemock/test/gmock-generated-actions_test.cc b/googlemock/test/gmock-generated-actions_test.cc index 03908588..80bcb31c 100644 --- a/googlemock/test/gmock-generated-actions_test.cc +++ b/googlemock/test/gmock-generated-actions_test.cc @@ -1120,7 +1120,7 @@ TEST(ActionTemplateTest, WorksForIntegralTemplateParams) { EXPECT_FALSE(b); // Verifies that resetter is deleted. } -// Tests that ACTION_TEMPLATES works for template parameters. +// Tests that ACTION_TEMPLATE works for a template with template parameters. ACTION_TEMPLATE(ReturnSmartPointer, HAS_1_TEMPLATE_PARAMS(template <typename Pointee> class, Pointer), diff --git a/googletest/docs/AdvancedGuide.md b/googletest/docs/AdvancedGuide.md index 514bc35e..a454bf45 100644 --- a/googletest/docs/AdvancedGuide.md +++ b/googletest/docs/AdvancedGuide.md @@ -128,7 +128,7 @@ c is 10<br> 1. If you see a compiler error "no matching function to call" when using `ASSERT_PRED*` or `EXPECT_PRED*`, please see [this FAQ](FAQ.md#the-compiler-complains-no-matching-function-to-call-when-i-use-assert_predn-how-do-i-fix-it) for how to resolve it. 1. Currently we only provide predicate assertions of arity <= 5. If you need a higher-arity assertion, let us know. -_Availability_: Linux, Windows, Mac +_Availability_: Linux, Windows, Mac. ### Using a Function That Returns an AssertionResult ### @@ -1444,7 +1444,7 @@ absolutely have to test non-public interface code though, you can. There are two cases to consider: * Static functions (_not_ the same as static member functions!) or unnamed namespaces, and - * Private or protected class members + * Private or protected class members. ## Static Functions ## diff --git a/googletest/docs/Primer.md b/googletest/docs/Primer.md index fb2b81b8..ae2dfa13 100644 --- a/googletest/docs/Primer.md +++ b/googletest/docs/Primer.md @@ -416,7 +416,7 @@ When invoked, the `RUN_ALL_TESTS()` macro: 1. Restores the state of all Google Test flags. 1. Repeats the above steps for the next test, until all tests have run. -In addition, if the text fixture's constructor generates a fatal failure in +In addition, if the test fixture's constructor generates a fatal failure in step 2, there is no point for step 3 - 5 and they are thus skipped. Similarly, if step 3 generates a fatal failure, step 4 will be skipped. diff --git a/googletest/docs/V1_7_Primer.md b/googletest/docs/V1_7_Primer.md index b1827c73..b0ee5976 100644 --- a/googletest/docs/V1_7_Primer.md +++ b/googletest/docs/V1_7_Primer.md @@ -108,6 +108,7 @@ streamed to an assertion, it will be translated to UTF-8 when printed. ## Basic Assertions ## These assertions do basic true/false condition testing. + | **Fatal assertion** | **Nonfatal assertion** | **Verifies** | |:--------------------|:-----------------------|:-------------| | `ASSERT_TRUE(`_condition_`)`; | `EXPECT_TRUE(`_condition_`)`; | _condition_ is true | diff --git a/googletest/samples/sample3_unittest.cc b/googletest/samples/sample3_unittest.cc index bf3877d0..a4fbe5a0 100644 --- a/googletest/samples/sample3_unittest.cc +++ b/googletest/samples/sample3_unittest.cc @@ -72,7 +72,7 @@ class QueueTest : public testing::Test { // accessed from sub-classes. // virtual void SetUp() will be called before each test is run. You - // should define it if you need to initialize the varaibles. + // should define it if you need to initialize the variables. // Otherwise, this can be skipped. virtual void SetUp() { q1_.Enqueue(1); diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index e04a1c67..46d8d21b 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -310,7 +310,8 @@ namespace internal { // than kMaxRange. UInt32 Random::Generate(UInt32 range) { // These constants are the same as are used in glibc's rand(3). - state_ = (1103515245U*state_ + 12345U) % kMaxRange; + // Use wider types than necessary to prevent unsigned overflow diagnostics. + state_ = static_cast<UInt32>(1103515245ULL*state_ + 12345U) % kMaxRange; GTEST_CHECK_(range > 0) << "Cannot generate a number in the range [0, 0)."; |