summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorHerbert Thielen <thielen@hs-worms.de>2017-09-05 09:32:13 (GMT)
committerGitHub <noreply@github.com>2017-09-05 09:32:13 (GMT)
commit88b76525dd2731cdbad0c60d04464c083d863510 (patch)
tree3109ab05a99bc982e09fd460d438db8fa0e7c069 /googletest
parent1a8ba67414be5b56fba32059158dc171c0663d29 (diff)
parent7c6353d29a147cad1c904bf2957fd4ca2befe135 (diff)
downloadgoogletest-88b76525dd2731cdbad0c60d04464c083d863510.zip
googletest-88b76525dd2731cdbad0c60d04464c083d863510.tar.gz
googletest-88b76525dd2731cdbad0c60d04464c083d863510.tar.bz2
Merge branch 'master' into hethi/unused-import
Diffstat (limited to 'googletest')
-rw-r--r--googletest/.gitignore2
-rw-r--r--googletest/cmake/internal_utils.cmake32
-rw-r--r--googletest/configure.ac2
-rw-r--r--googletest/docs/FAQ.md4
-rw-r--r--googletest/docs/PumpManual.md2
-rwxr-xr-xgoogletest/scripts/fuse_gtest_files.py2
-rw-r--r--googletest/src/gtest.cc2
-rw-r--r--googletest/test/gtest-param-test_test.cc8
-rw-r--r--googletest/test/gtest_unittest.cc2
9 files changed, 32 insertions, 24 deletions
diff --git a/googletest/.gitignore b/googletest/.gitignore
deleted file mode 100644
index 4b7be4b..0000000
--- a/googletest/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# python
-*.pyc
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index f0f54d0..ec5d08c 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -236,23 +236,33 @@ endfunction()
# creates a Python test with the given name whose main module is in
# test/name.py. It does nothing if Python is not installed.
function(py_test name)
- # We are not supporting Python tests on Linux yet as they consider
- # all Linux environments to be google3 and try to use google3 features.
if (PYTHONINTERP_FOUND)
- # ${CMAKE_BINARY_DIR} is known at configuration time, so we can
- # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
- # only at ctest runtime (by calling ctest -c <Configuration>), so
- # we have to escape $ to delay variable substitution here.
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1)
- add_test(
- NAME ${name}
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
- --build_dir=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>)
+ if (CMAKE_CONFIGURATION_TYPES)
+ # Multi-configuration build generators as for Visual Studio save
+ # output in a subdirectory of CMAKE_CURRENT_BINARY_DIR (Debug,
+ # Release etc.), so we have to provide it here.
+ add_test(
+ NAME ${name}
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+ --build_dir=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)
+ else (CMAKE_CONFIGURATION_TYPES)
+ # Single-configuration build generators like Makefile generators
+ # don't have subdirs below CMAKE_CURRENT_BINARY_DIR.
+ add_test(
+ NAME ${name}
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+ --build_dir=${CMAKE_CURRENT_BINARY_DIR})
+ endif (CMAKE_CONFIGURATION_TYPES)
else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1)
+ # ${CMAKE_CURRENT_BINARY_DIR} is known at configuration time, so we can
+ # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
+ # only at ctest runtime (by calling ctest -c <Configuration>), so
+ # we have to escape $ to delay variable substitution here.
add_test(
${name}
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
--build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1)
- endif()
+ endif(PYTHONINTERP_FOUND)
endfunction()
diff --git a/googletest/configure.ac b/googletest/configure.ac
index cc592e1..254c8c4 100644
--- a/googletest/configure.ac
+++ b/googletest/configure.ac
@@ -5,7 +5,7 @@ m4_include(m4/acx_pthread.m4)
# "[1.0.1]"). It also asumes that there won't be any closing parenthesis
# between "AC_INIT(" and the closing ")" including comments and strings.
AC_INIT([Google C++ Testing Framework],
- [1.7.0],
+ [1.8.0],
[googletestframework@googlegroups.com],
[gtest])
diff --git a/googletest/docs/FAQ.md b/googletest/docs/FAQ.md
index 36f5f7f..76c2372 100644
--- a/googletest/docs/FAQ.md
+++ b/googletest/docs/FAQ.md
@@ -1034,7 +1034,7 @@ namespace bar {
TEST(CoolTest, DoSomething) {
SUCCEED();
}
-} // namespace foo
+} // namespace bar
```
However, the following code is **not allowed** and will produce a runtime error from Google Test because the test methods are using different test fixture classes with the same test case name.
@@ -1052,7 +1052,7 @@ class CoolTest : public ::testing::Test {}; // Fixture: bar::CoolTest
TEST_F(CoolTest, DoSomething) {
SUCCEED();
}
-} // namespace foo
+} // namespace bar
```
## How do I build Google Testing Framework with Xcode 4? ##
diff --git a/googletest/docs/PumpManual.md b/googletest/docs/PumpManual.md
index 109c7f2..827bb24 100644
--- a/googletest/docs/PumpManual.md
+++ b/googletest/docs/PumpManual.md
@@ -40,7 +40,7 @@ maintain.
## Highlights ##
* The implementation is in a single Python script and thus ultra portable: no build or installation is needed and it works cross platforms.
- * Pump tries to be smart with respect to [Google's style guide](http://code.google.com/p/google-styleguide/): it breaks long lines (easy to have when they are generated) at acceptable places to fit within 80 columns and indent the continuation lines correctly.
+ * Pump tries to be smart with respect to [Google's style guide](https://github.com/google/styleguide): it breaks long lines (easy to have when they are generated) at acceptable places to fit within 80 columns and indent the continuation lines correctly.
* The format is human-readable and more concise than XML.
* The format works relatively well with Emacs' C++ mode.
diff --git a/googletest/scripts/fuse_gtest_files.py b/googletest/scripts/fuse_gtest_files.py
index 3f3e9f3..9a5c8d3 100755
--- a/googletest/scripts/fuse_gtest_files.py
+++ b/googletest/scripts/fuse_gtest_files.py
@@ -52,7 +52,7 @@ EXAMPLES
This tool is experimental. In particular, it assumes that there is no
conditional inclusion of Google Test headers. Please report any
problems to googletestframework@googlegroups.com. You can read
-http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide for
+https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md for
more information.
"""
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index b6087f9..2484caf 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -4812,7 +4812,7 @@ bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
// each TestCase and TestInfo object.
// If shard_tests == true, further filters tests based on sharding
// variables in the environment - see
-// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide.
+// https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md .
// Returns the number of tests that should run.
int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?
diff --git a/googletest/test/gtest-param-test_test.cc b/googletest/test/gtest-param-test_test.cc
index 8b278bb..857f6c5 100644
--- a/googletest/test/gtest-param-test_test.cc
+++ b/googletest/test/gtest-param-test_test.cc
@@ -141,7 +141,7 @@ void VerifyGenerator(const ParamGenerator<T>& generator,
<< ", expected_values[i] is " << PrintValue(expected_values[i])
<< ", *it is " << PrintValue(*it)
<< ", and 'it' is an iterator created with the copy constructor.\n";
- it++;
+ ++it;
}
EXPECT_TRUE(it == generator.end())
<< "At the presumed end of sequence when accessing via an iterator "
@@ -161,7 +161,7 @@ void VerifyGenerator(const ParamGenerator<T>& generator,
<< ", expected_values[i] is " << PrintValue(expected_values[i])
<< ", *it is " << PrintValue(*it)
<< ", and 'it' is an iterator created with the copy constructor.\n";
- it++;
+ ++it;
}
EXPECT_TRUE(it == generator.end())
<< "At the presumed end of sequence when accessing via an iterator "
@@ -196,7 +196,7 @@ TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) {
<< "element same as its source points to";
// Verifies that iterator assignment works as expected.
- it++;
+ ++it;
EXPECT_FALSE(*it == *it2);
it2 = it;
EXPECT_TRUE(*it == *it2) << "Assigned iterators must point to the "
@@ -215,7 +215,7 @@ TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) {
// Verifies that prefix and postfix operator++() advance an iterator
// all the same.
it2 = it;
- it++;
+ ++it;
++it2;
EXPECT_TRUE(*it == *it2);
}
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 0ae8e03..f84def9 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -7655,7 +7655,7 @@ TEST(NativeArrayTest, MethodsWork) {
EXPECT_EQ(0, *it);
++it;
EXPECT_EQ(1, *it);
- it++;
+ ++it;
EXPECT_EQ(2, *it);
++it;
EXPECT_EQ(na.end(), it);