aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--googlemock/docs/for_dummies.md4
-rw-r--r--googlemock/include/gmock/gmock-spec-builders.h2
-rw-r--r--googletest/include/gtest/internal/gtest-param-util.h5
-rw-r--r--googletest/test/googletest-output-test-golden-lin.txt9
-rw-r--r--googletest/test/googletest-output-test_.cc8
7 files changed, 23 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml
index 6b4c5c76..56f7d7c1 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 @@ language: cpp
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 @@ install:
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 e8f77c98..7e8b4799 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -131,7 +131,7 @@ gtest-type-util.h in the same directory.
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 3bccd2bd..db579df5 100644
--- a/googlemock/docs/for_dummies.md
+++ b/googlemock/docs/for_dummies.md
@@ -148,8 +148,8 @@ follow:
* 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 81ee3457..735a3bcb 100644
--- a/googlemock/include/gmock/gmock-spec-builders.h
+++ b/googlemock/include/gmock/gmock-spec-builders.h
@@ -1870,7 +1870,7 @@ class MockFunction<R(Args...)> {
}
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 e900b3ff..97533993 100644
--- a/googletest/include/gtest/internal/gtest-param-util.h
+++ b/googletest/include/gtest/internal/gtest-param-util.h
@@ -565,7 +565,10 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
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 270b15ae..038de921 100644
--- a/googletest/test/googletest-output-test-golden-lin.txt
+++ b/googletest/test/googletest-output-test-golden-lin.txt
@@ -12,7 +12,7 @@ Expected equality of these values:
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 @@ Expected equality of these values:
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 @@ Failed
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 f1222b6a..83be568c 100644
--- a/googletest/test/googletest-output-test_.cc
+++ b/googletest/test/googletest-output-test_.cc
@@ -96,6 +96,14 @@ INSTANTIATE_TEST_SUITE_P(PrintingFailingParams,
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) {