diff options
-rw-r--r-- | googletest/test/gtest-death-test_test.cc | 4 | ||||
-rw-r--r-- | googletest/test/gtest-filepath_test.cc | 6 | ||||
-rw-r--r-- | googletest/test/gtest-options_test.cc | 1 | ||||
-rw-r--r-- | googletest/test/gtest-param-test2_test.cc | 1 | ||||
-rw-r--r-- | googletest/test/gtest-port_test.cc | 4 | ||||
-rw-r--r-- | googletest/test/gtest_break_on_failure_unittest_.cc | 3 | ||||
-rw-r--r-- | googletest/test/gtest_output_test_.cc | 10 | ||||
-rw-r--r-- | googletest/test/gtest_repeat_test.cc | 1 | ||||
-rw-r--r-- | googletest/test/gtest_stress_test.cc | 1 | ||||
-rw-r--r-- | googletest/test/gtest_xml_outfile1_test_.cc | 1 | ||||
-rw-r--r-- | googletest/test/gtest_xml_outfile2_test_.cc | 1 | ||||
-rw-r--r-- | googletest/test/gtest_xml_output_unittest_.cc | 2 |
12 files changed, 19 insertions, 16 deletions
diff --git a/googletest/test/gtest-death-test_test.cc b/googletest/test/gtest-death-test_test.cc index 0e1e87b..b7846b2 100644 --- a/googletest/test/gtest-death-test_test.cc +++ b/googletest/test/gtest-death-test_test.cc @@ -305,14 +305,14 @@ void DieWithEmbeddedNul() { } # if GTEST_USES_PCRE + // Tests that EXPECT_DEATH and ASSERT_DEATH work when the error // message has a NUL character in it. TEST_F(TestForDeathTest, EmbeddedNulInMessage) { - // TODO(wan@google.com): <regex.h> doesn't support matching strings - // with embedded NUL characters - find a way to workaround it. EXPECT_DEATH(DieWithEmbeddedNul(), "my null world"); ASSERT_DEATH(DieWithEmbeddedNul(), "my null world"); } + # endif // GTEST_USES_PCRE // Tests that death test macros expand to code which interacts well with switch diff --git a/googletest/test/gtest-filepath_test.cc b/googletest/test/gtest-filepath_test.cc index cc4883b..29cea3d 100644 --- a/googletest/test/gtest-filepath_test.cc +++ b/googletest/test/gtest-filepath_test.cc @@ -27,16 +27,14 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: keith.ray@gmail.com (Keith Ray) // // Google Test filepath utilities // // This file tests classes and functions used internally by // Google Test. They are subject to change without notice. // -// This file is #included from gtest_unittest.cc, to avoid changing -// build or make-files for some existing Google Test clients. Do not -// #include this file anywhere else! +// This file is #included from gtest-internal.h. +// Do not #include this file anywhere else! #include "gtest/internal/gtest-filepath.h" #include "gtest/gtest.h" diff --git a/googletest/test/gtest-options_test.cc b/googletest/test/gtest-options_test.cc index 70f3ce9..25c9f39 100644 --- a/googletest/test/gtest-options_test.cc +++ b/googletest/test/gtest-options_test.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: keith.ray@gmail.com (Keith Ray) // // Google Test UnitTestOptions tests // diff --git a/googletest/test/gtest-param-test2_test.cc b/googletest/test/gtest-param-test2_test.cc index e7afdc3..0c09b27 100644 --- a/googletest/test/gtest-param-test2_test.cc +++ b/googletest/test/gtest-param-test2_test.cc @@ -59,3 +59,4 @@ INSTANTIATE_TEST_CASE_P(MultiplesOf33, INSTANTIATE_TEST_CASE_P(Sequence2, InstantiationInMultipleTranslaionUnitsTest, Values(42*3, 42*4, 42*5)); + diff --git a/googletest/test/gtest-port_test.cc b/googletest/test/gtest-port_test.cc index 2c59edc..4ed4afc 100644 --- a/googletest/test/gtest-port_test.cc +++ b/googletest/test/gtest-port_test.cc @@ -67,8 +67,8 @@ TEST(IsXDigitTest, WorksForNarrowAscii) { } TEST(IsXDigitTest, ReturnsFalseForNarrowNonAscii) { - EXPECT_FALSE(IsXDigit('\x80')); - EXPECT_FALSE(IsXDigit(static_cast<char>('0' | '\x80'))); + EXPECT_FALSE(IsXDigit(static_cast<char>(0x80))); + EXPECT_FALSE(IsXDigit(static_cast<char>('0' | 0x80))); } TEST(IsXDigitTest, WorksForWideAscii) { diff --git a/googletest/test/gtest_break_on_failure_unittest_.cc b/googletest/test/gtest_break_on_failure_unittest_.cc index dd07478..1231ec2 100644 --- a/googletest/test/gtest_break_on_failure_unittest_.cc +++ b/googletest/test/gtest_break_on_failure_unittest_.cc @@ -80,8 +80,7 @@ int main(int argc, char **argv) { SetUnhandledExceptionFilter(ExitWithExceptionCode); # endif -#endif - +#endif // GTEST_OS_WINDOWS testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/googletest/test/gtest_output_test_.cc b/googletest/test/gtest_output_test_.cc index 6aaba97..c7ccc21 100644 --- a/googletest/test/gtest_output_test_.cc +++ b/googletest/test/gtest_output_test_.cc @@ -168,6 +168,16 @@ void SubWithTrace(int n) { SubWithoutTrace(n); } +TEST(SCOPED_TRACETest, AcceptedValues) { + SCOPED_TRACE("literal string"); + SCOPED_TRACE(std::string("std::string")); + SCOPED_TRACE(1337); // streamable type + const char* null_value = NULL; + SCOPED_TRACE(null_value); + + ADD_FAILURE() << "Just checking that all these values work fine."; +} + // Tests that SCOPED_TRACE() obeys lexical scopes. TEST(SCOPED_TRACETest, ObeysScopes) { printf("(expected to fail)\n"); diff --git a/googletest/test/gtest_repeat_test.cc b/googletest/test/gtest_repeat_test.cc index dcaadd7..b9e65e4 100644 --- a/googletest/test/gtest_repeat_test.cc +++ b/googletest/test/gtest_repeat_test.cc @@ -210,6 +210,7 @@ void TestRepeatWithFilterForFailedTests(int repeat) { int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); + testing::AddGlobalTestEnvironment(new MyEnvironment); TestRepeatUnspecified(); diff --git a/googletest/test/gtest_stress_test.cc b/googletest/test/gtest_stress_test.cc index 59a1b62..cac405f 100644 --- a/googletest/test/gtest_stress_test.cc +++ b/googletest/test/gtest_stress_test.cc @@ -34,7 +34,6 @@ #include "gtest/gtest.h" -#include <iostream> #include <vector> #include "src/gtest-internal-inl.h" diff --git a/googletest/test/gtest_xml_outfile1_test_.cc b/googletest/test/gtest_xml_outfile1_test_.cc index 531ced4..e3d1dd1 100644 --- a/googletest/test/gtest_xml_outfile1_test_.cc +++ b/googletest/test/gtest_xml_outfile1_test_.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Author: keith.ray@gmail.com (Keith Ray) // // gtest_xml_outfile1_test_ writes some xml via TestProperty used by // gtest_xml_outfiles_test.py diff --git a/googletest/test/gtest_xml_outfile2_test_.cc b/googletest/test/gtest_xml_outfile2_test_.cc index 7b400b2..55eb8f3 100644 --- a/googletest/test/gtest_xml_outfile2_test_.cc +++ b/googletest/test/gtest_xml_outfile2_test_.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Author: keith.ray@gmail.com (Keith Ray) // // gtest_xml_outfile2_test_ writes some xml via TestProperty used by // gtest_xml_outfiles_test.py diff --git a/googletest/test/gtest_xml_output_unittest_.cc b/googletest/test/gtest_xml_output_unittest_.cc index 48b8771..2ee8838 100644 --- a/googletest/test/gtest_xml_output_unittest_.cc +++ b/googletest/test/gtest_xml_output_unittest_.cc @@ -27,8 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Author: eefacm@gmail.com (Sean Mcafee) - // Unit test for Google Test XML output. // // A user can specify XML output in a Google Test program to run via |