ddavis2speedray / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Death tests are not enabled properly on Solaris #170

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile any test cases using death test asserts (eq. EXPECT_EXIT())

What is the expected output? What do you see instead?

The following error message occurs:

gtest-1.3.0/include/gtest/internal/gtest-port.h", line 616: Error: vector 
is not a member of std.

What version of the product are you using? On what operating system?

gtest 1.3.0

System (uname -a)
SunOS 5.10 Generic_118833-03 sun4u sparc SUNW,Sun-Fire-V890

Compiler (CC -V)
Sun C++ 5.8 2005/10/13

Please provide any additional information below.

It happens because GTEST_OS_SOLARIS macro is not used when 
GTEST_HAS_DEATH_TEST is being set.

The following patch solves this problem:

==== gtest-1.3.0/include/gtest/internal/gtest-port.h#1 - gtest-
1.3.0/include/gtest/internal/gtest-port.h ====
@@ -379,6 +379,7 @@
 #if GTEST_HAS_STD_STRING && (GTEST_OS_LINUX || \
                              GTEST_OS_MAC || \
                              GTEST_OS_CYGWIN || \
+                             GTEST_OS_SOLARIS || \
                              (GTEST_OS_WINDOWS && _MSC_VER >= 1400))
 #define GTEST_HAS_DEATH_TEST 1
 #include <vector>

Original issue reported on code.google.com by ade...@gmail.com on 29 Jul 2009 at 2:31

GoogleCodeExporter commented 9 years ago

Original comment by zhanyong...@gmail.com on 16 Sep 2009 at 6:00

GoogleCodeExporter commented 9 years ago
Fixed in r371.

Original comment by vladlosev on 8 Mar 2010 at 6:36