Merge pull request #2372 from pitrou:issue2371-windows-crt-asserts

PiperOrigin-RevId: 262040609
diff --git a/.travis.yml b/.travis.yml
index 6b4c5c7..56f7d7c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,6 @@
 # This file can be validated on:
 # http://lint.travis-ci.org/
 
-sudo: false
 language: cpp
 
 # Define the matrix explicitly, manually expanding the combinations of (os, compiler, env).
@@ -11,20 +10,17 @@
 matrix:
   include:
     - os: linux
-      sudo: required
       before_install: chmod -R +x ./ci/*platformio.sh
       install: ./ci/install-platformio.sh
       script: ./ci/build-platformio.sh
     - os: linux
       dist: xenial
       compiler: gcc
-      sudo : true
       install: ./ci/install-linux.sh && ./ci/log-config.sh
       script: ./ci/build-linux-bazel.sh
     - os: linux
       dist: xenial
       compiler: clang
-      sudo : true
       install: ./ci/install-linux.sh && ./ci/log-config.sh
       script: ./ci/build-linux-bazel.sh
     - os: linux
@@ -52,7 +48,7 @@
 
 script: ./ci/travis.sh
 
-# For sudo=false builds this section installs the necessary dependencies.
+# This section installs the necessary dependencies.
 addons:
   apt:
     # List of whitelisted in travis packages for ubuntu-precise can be found here:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e8f77c9..7e8b479 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -131,7 +131,7 @@
 You don't need to worry about regenerating the source files unless you need to
 modify them. You would then modify the corresponding `.pump` files and run the
 '[pump.py](googletest/scripts/pump.py)' generator script. See the
-[Pump Manual](googletest/docs/PumpManual.md).
+[Pump Manual](googletest/docs/pump_manual.md).
 
 ## Developing Google Mock
 
diff --git a/googlemock/docs/for_dummies.md b/googlemock/docs/for_dummies.md
index 3bccd2b..db579df 100644
--- a/googlemock/docs/for_dummies.md
+++ b/googlemock/docs/for_dummies.md
@@ -148,8 +148,8 @@
 
 *   Derive a class `MockTurtle` from `Turtle`.
 *   Take a *virtual* function of `Turtle` (while it's possible to
-    [mock non-virtual methods using templates](#MockingNonVirtualMethods), it's
-    much more involved).
+    [mock non-virtual methods using templates](cook_book.md#MockingNonVirtualMethods),
+    it's much more involved).
 *   In the `public:` section of the child class, write `MOCK_METHOD();`
 *   Now comes the fun part: you take the function signature, cut-and-paste it
     into the macro, and add two commas - one between the return type and the
diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h
index 81ee345..735a3bc 100644
--- a/googlemock/include/gmock/gmock-spec-builders.h
+++ b/googlemock/include/gmock/gmock-spec-builders.h
@@ -1870,7 +1870,7 @@
   }
 
  private:
-  mutable internal::FunctionMocker<R(Args...)> mock_;
+  internal::FunctionMocker<R(Args...)> mock_;
 };
 
 // The style guide prohibits "using" statements in a namespace scope
diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h
index e900b3f..9753399 100644
--- a/googletest/include/gtest/internal/gtest-param-util.h
+++ b/googletest/include/gtest/internal/gtest-param-util.h
@@ -565,7 +565,10 @@
 
           test_param_names.insert(param_name);
 
-          test_name_stream << test_info->test_base_name << "/" << param_name;
+          if (!test_info->test_base_name.empty()) {
+            test_name_stream << test_info->test_base_name << "/";
+          }
+          test_name_stream << param_name;
           MakeAndRegisterTestInfo(
               test_suite_name.c_str(), test_name_stream.GetString().c_str(),
               nullptr,  // No type parameter.
diff --git a/googletest/test/googletest-output-test-golden-lin.txt b/googletest/test/googletest-output-test-golden-lin.txt
index 270b15a..038de92 100644
--- a/googletest/test/googletest-output-test-golden-lin.txt
+++ b/googletest/test/googletest-output-test-golden-lin.txt
@@ -12,7 +12,7 @@
   3
 Stack trace: (omitted)
 
-[==========] Running 84 tests from 39 test suites.
+[==========] Running 85 tests from 40 test suites.
 [----------] Global test environment set-up.
 FooEnvironment::SetUp() called.
 BarEnvironment::SetUp() called.
@@ -966,6 +966,9 @@
 Stack trace: (omitted)
 
 [  FAILED  ] PrintingFailingParams/FailingParamTest.Fails/0, where GetParam() = 2
+[----------] 1 test from EmptyBasenameParamInst
+[ RUN      ] EmptyBasenameParamInst.Passes/0
+[       OK ] EmptyBasenameParamInst.Passes/0
 [----------] 2 tests from PrintingStrings/ParamTest
 [ RUN      ] PrintingStrings/ParamTest.Success/a
 [       OK ] PrintingStrings/ParamTest.Success/a
@@ -992,8 +995,8 @@
 Expected fatal failure.
 Stack trace: (omitted)
 
-[==========] 84 tests from 39 test suites ran.
-[  PASSED  ] 30 tests.
+[==========] 85 tests from 40 test suites ran.
+[  PASSED  ] 31 tests.
 [  FAILED  ] 54 tests, listed below:
 [  FAILED  ] NonfatalFailureTest.EscapesStringOperands
 [  FAILED  ] NonfatalFailureTest.DiffForLongStrings
diff --git a/googletest/test/googletest-output-test_.cc b/googletest/test/googletest-output-test_.cc
index f1222b6..83be568 100644
--- a/googletest/test/googletest-output-test_.cc
+++ b/googletest/test/googletest-output-test_.cc
@@ -96,6 +96,14 @@
                          FailingParamTest,
                          testing::Values(2));
 
+// Tests that an empty value for the test suite basename yields just
+// the test name without any prior /
+class EmptyBasenameParamInst : public testing::TestWithParam<int> {};
+
+TEST_P(EmptyBasenameParamInst, Passes) { EXPECT_EQ(1, GetParam()); }
+
+INSTANTIATE_TEST_SUITE_P(, EmptyBasenameParamInst, testing::Values(1));
+
 static const char kGoldenString[] = "\"Line\0 1\"\nLine 2";
 
 TEST(NonfatalFailureTest, EscapesStringOperands) {