announce: Google Test 1.6.0 release candidate

152 views
Skip to first unread message

Zhanyong Wan (λx.x x)

unread,
Feb 24, 2011, 4:16:37 PM2/24/11
to Google C++ Testing Framework
Dear users of Google Test,

We plan to release Google Test 1.6.0 in the next few days. We need
your help to make it successful.

I've uploaded a release candidate to
http://code.google.com/p/googletest/downloads/detail?name=gtest-1.6.0-rc.zip
-- please download it, try it, and report any problems (patches are
even better), especially if your platform isn't official supported
(i.e. anything outside of Windows, Mac OS X, and Linux). I have only
had time to test it on Linux.

Thanks,
--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Feb 24, 2011, 4:59:05 PM2/24/11
to Google C++ Testing Framework
2011/2/24 Zhanyong Wan (λx.x x) <w...@google.com>:

To see what's new in this release, you can read the CHANGES file in the .zip:

Changes for 1.6.0:

* New feature: ADD_FAILURE_AT() for reporting a test failure at the
given source location -- useful for writing testing utilities.
* New feature: the universal value printer is moved from Google Mock
to Google Test.
* New feature: type parameters and value parameters are reported in
the XML report now.
* A gtest_disable_pthreads CMake option.
* Colored output works in GNU Screen sessions now.
* Parameters of value-parameterized tests are now printed in the
textual output.
* Failures from ad hoc test assertions run before RUN_ALL_TESTS() are
now correctly reported.
* Arguments of ASSERT_XY and EXPECT_XY no longer need to support << to
ostream.
* More complete handling of exceptions.
* GTEST_ASSERT_XY can be used instead of ASSERT_XY in case the latter
name is already used by another library.
* --gtest_catch_exceptions is now true by default, allowing a test
program to continue after an exception is thrown.
* Value-parameterized test fixtures can now derive from Test and
WithParamInterface<T> separately, easing conversion of legacy tests.
* Death test messages are clearly marked to make them more
distinguishable from other messages.
* Compatibility fixes for Google Native Client, MinGW, Lucid
autotools, and C++0x.
* Bug fixes and implementation clean-ups.


--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Feb 25, 2011, 11:59:45 AM2/25/11
to Joanna Biernat-Gerono, Google C++ Testing Framework
Hi Joanna,

2011/2/25 Joanna Biernat-Gerono <jbierna...@gmail.com>:
> Hi,
>
> I have a question about official support for Microsoft Visual Studio 2010
> (ver. 10). At the moment you wrote that any version above 7.1 or newer is
> supported however when I open the *.vcproj projects with my VS version they
> get converted to *.vcxproj with some warnings and I am not sure how this
> conversion impacts gtest.
> I already asked for some explanation on googletes...@googlegroups.com
> but did not receive any response so far.
>
> I would really appreciate your advise.

You should be able to ignore the warnings if the library and your
tests compile and run fine.

We are not actively working on gtest's build systems. If someone
wants to contribute VS 2010 projects, a patch is welcome. Thanks,

> King redards,
> Joanna

--
Zhanyong

Steve Fox

unread,
Feb 25, 2011, 4:39:48 PM2/25/11
to Zhanyong Wan (λx.x x), Google C++ Testing Framework
I was able to build this release on FreeBSD 8.1. The samples all ran
successfully. The unit tests all built and generally appeared to run
correctly, however there is a LOT of output generated and I'm not sure
exactly how to interpret it all. If you care to review it, I have
posted the output at http://thefoxhome.net/gtest_tests.txt.bz2

I also ran all of my own tests successfully. I did not change any
tests to use new features in this release though.

--
Steve Fox

Zhanyong Wan (λx.x x)

unread,
Feb 25, 2011, 4:44:02 PM2/25/11
to Steve Fox, Google C++ Testing Framework
Thanks for helping, Steve!

2011/2/25 Steve Fox <li...@thefoxhome.net>:


> I was able to build this release on FreeBSD 8.1. The samples all ran
> successfully. The unit tests all built and generally appeared to run
> correctly, however there is a LOT of output generated and I'm not sure
> exactly how to interpret it all.

You can ignore all of the output. What matters is the exit code of
the 'make check' command (or 'make test' if you use cmake).

make check && echo OK

If you see "OK" at the end, then it's OK.

> If you care to review it, I have
> posted the output at http://thefoxhome.net/gtest_tests.txt.bz2
>
> I also ran all of my own tests successfully. I did not change any
> tests to use new features in this release though.
>
> --
> Steve Fox
>

--
Zhanyong

Vlad Losev

unread,
Feb 25, 2011, 4:53:42 PM2/25/11
to Steve Fox, Zhanyong Wan (λx.x x), Google C++ Testing Framework
Steve,

Autotools runs only the basic tests. If possible, try to build and run tests using CMake, which builds the complete test suite. Here are the commands to run:

mkdir cmake-build && cd cmake-build
cmake .. -Dgtest_build_tests=ON -Dgtest_build_samples=ON
make && make test

It will print the summary of test results at the end.

2011/2/25 Zhanyong Wan (λx.x x) <w...@google.com>


Regards,
Vlad

Steve Fox

unread,
Feb 25, 2011, 6:07:49 PM2/25/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/25 Vlad Losev <vl...@google.com>:

> mkdir cmake-build && cd cmake-build
> cmake .. -Dgtest_build_tests=ON -Dgtest_build_samples=ON
> make && make test
>
> It will print the summary of test results at the end.

Much easier! It looks good.

100% tests passed, 0 tests failed out of 40

I also got the passing results in Cygwin so you can cross that off the
list of tested platforms too.

100% tests passed, 0 tests failed out of 27

--
Steve Fox

Zhanyong Wan (λx.x x)

unread,
Feb 25, 2011, 6:09:24 PM2/25/11
to Steve Fox, Vlad Losev, Google C++ Testing Framework
2011/2/25 Steve Fox <li...@thefoxhome.net>:

Great! Much appreciated.

MATSUMOTO Eiji

unread,
Feb 26, 2011, 8:42:51 AM2/26/11
to Google C++ Testing Framework
Hi.
I tried it in Mac OS X 10.5.8 + PowerPC G4.
One error occurred in gtest-printers_test.

----
[ RUN ] PrintUnprintableTypeTest.InGlobalNamespace
/Users/matsumoto/Downloads/gtest-1.6.0/test/gtest-printers_test.cc:
998: Failure
Value of: Print(UnprintableTemplateInGlobal<bool>())
Actual: "4-byte object <00-00 00-00>"
Expected: "1-byte object <00>"
[ FAILED ] PrintUnprintableTypeTest.InGlobalNamespace (7 ms)
----

`man gcc` said:

-mone-byte-bool
Override the defaults for bool so that sizeof(bool)==1. By
default
sizeof(bool) is 4 when compiling for Darwin/PowerPC and 1
when
compiling for Darwin/x86, so this option has no effect on
x86.

Regards.

On 2月25日, 午前6:16, Zhanyong Wan (λx.x x) <w...@google.com> wrote:
> Dear users of Google Test,
>
> We plan to release Google Test 1.6.0 in the next few days.  We need
> your help to make it successful.
>
> I've uploaded a release candidate tohttp://code.google.com/p/googletest/downloads/detail?name=gtest-1.6.0...

Chris Kilner

unread,
Feb 26, 2011, 12:46:16 PM2/26/11
to Google C++ Testing Framework
All tests pass in:
VS2010 / VS2008 , debug / release, gtest.sln / gtest-md.sln

It may be worth mentioning, that since VS needs to 'upgrade' the projects, users currently need to change the settings of the msvc directory so that it is not read-only before attempting to open in VS.

Hope this helps,

Chris

Vlad Losev

unread,
Feb 28, 2011, 1:03:56 PM2/28/11
to MATSUMOTO Eiji, Google C++ Testing Framework
Thanks for the report!

On Sat, Feb 26, 2011 at 5:42 AM, MATSUMOTO Eiji <e.ma...@gmail.com> wrote:
Hi.
I tried it in Mac OS X 10.5.8 + PowerPC G4.
One error occurred in gtest-printers_test.

----
[ RUN      ] PrintUnprintableTypeTest.InGlobalNamespace
/Users/matsumoto/Downloads/gtest-1.6.0/test/gtest-printers_test.cc:
998: Failure
Value of: Print(UnprintableTemplateInGlobal<bool>())
 Actual: "4-byte object <00-00 00-00>"
Expected: "1-byte object <00>"
[  FAILED  ] PrintUnprintableTypeTest.InGlobalNamespace (7 ms)
----

`man gcc` said:

      -mone-byte-bool
          Override the defaults for bool so that sizeof(bool)==1.  By
default
          sizeof(bool) is 4 when compiling for Darwin/PowerPC and 1
when
          compiling for Darwin/x86, so this option has no effect on
x86.

This shows the problem with the test itself - it expects the size of bool to be 1. The library code is apparently correct here. The patch for the test is in SVN revision 551 now. Let us know if it fixes the test.
 
Regards.

On 2月25日, 午前6:16, Zhanyong Wan (λx.x x) <w...@google.com> wrote:
> Dear users of Google Test,
>
> We plan to release Google Test 1.6.0 in the next few days.  We need
> your help to make it successful.
>
> I've uploaded a release candidate tohttp://code.google.com/p/googletest/downloads/detail?name=gtest-1.6.0...
> -- please download it, try it, and report any problems (patches are
> even better), especially if your platform isn't official supported
> (i.e. anything outside of Windows, Mac OS X, and Linux).  I have only
> had time to test it on Linux.
>
> Thanks,
> --
> Zhanyong

Thanks,
Vlad

Pat Notz

unread,
Feb 28, 2011, 1:30:40 PM2/28/11
to Google C++ Testing Framework
MacOS 10.5.8 / Intel using GCC 4.5.2 (from MacPorts):

95% tests passed, 2 tests failed out of 40

Total Test time (real) = 14.84 sec

The following tests FAILED:
29 - gtest_catch_exceptions_test (Failed)
19 - gtest_throw_on_failure_ex_test (OTHER_FAULT)
Errors while running CTest


I'm willing to supply more information if anyone has suggestions for
the best way to do that.

Thanks ~ Pat

Zhanyong Wan (λx.x x)

unread,
Feb 28, 2011, 1:57:00 PM2/28/11
to Pat Notz, Google C++ Testing Framework

Thanks, Pat!

You can run the failed test programs manually and copy-n-paste their
entire output. That would be really helpful for us to understand the
problem. Thanks!

--
Zhanyong

Pat Notz

unread,
Feb 28, 2011, 2:12:48 PM2/28/11
to Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Zhanyong Wan (λx.x x) <w...@google.com>:

> On Mon, Feb 28, 2011 at 10:30 AM, Pat Notz <pat...@gmail.com> wrote:
>> MacOS 10.5.8 / Intel using GCC 4.5.2 (from MacPorts):
>>
>> 95% tests passed, 2 tests failed out of 40
>>
>> Total Test time (real) =  14.84 sec
>>
>> The following tests FAILED:
>>         29 - gtest_catch_exceptions_test (Failed)
>>         19 - gtest_throw_on_failure_ex_test (OTHER_FAULT)
>> Errors while running CTest
>>
>>
>> I'm willing to supply more information if anyone has suggestions for
>> the best way to do that.
>>
>> Thanks ~ Pat
>
> You can run the failed test programs manually and copy-n-paste their
> entire output.  That would be really helpful for us to understand the
> problem.  Thanks!
>

$ ./gtest_throw_on_failure_ex_test
/Users/pknotz/workspace/gtest-1.6.0/test/gtest_throw_on_failure_ex_test.cc:65:
Failure
Value of: 3
Expected: 2
Expected failure
Abort trap

./gtest_catch_exceptions_ex_test_
[==========] Running 8 tests from 8 test cases.
[----------] Global test environment set-up.
[----------] 1 test from CxxExceptionInConstructorTest
[ RUN ] CxxExceptionInConstructorTest.ThrowsExceptionInConstructor
Abort trap

I'm happy to try more things if that'd help.

Vlad Losev

unread,
Feb 28, 2011, 2:27:57 PM2/28/11
to Pat Notz, Zhanyong Wan (λx.x x), Google C++ Testing Framework
Pat,

Thanks for your participation!

2011/2/28 Pat Notz <pat...@gmail.com>

2011/2/28 Zhanyong Wan (λx.x x) <w...@google.com>:
> On Mon, Feb 28, 2011 at 10:30 AM, Pat Notz <pat...@gmail.com> wrote:
>> MacOS 10.5.8 / Intel using GCC 4.5.2 (from MacPorts):
>>
>> 95% tests passed, 2 tests failed out of 40
>>
>> Total Test time (real) =  14.84 sec
>>
>> The following tests FAILED:
>>         29 - gtest_catch_exceptions_test (Failed)

gtest_catch_exceptions_test being a Python test, is easier to run via CTest:

(after invoking make)
ctest -R  gtest_catch_exceptions_test --output-on-failure

>>         19 - gtest_throw_on_failure_ex_test (OTHER_FAULT)
>> Errors while running CTest
>>
>>
>> I'm willing to supply more information if anyone has suggestions for
>> the best way to do that.
>>
>> Thanks ~ Pat
>
> You can run the failed test programs manually and copy-n-paste their
> entire output.  That would be really helpful for us to understand the
> problem.  Thanks!
>

$ ./gtest_throw_on_failure_ex_test
/Users/pknotz/workspace/gtest-1.6.0/test/gtest_throw_on_failure_ex_test.cc:65:
Failure
Value of: 3
Expected: 2
Expected failure
Abort trap

 ./gtest_catch_exceptions_ex_test_
[==========] Running 8 tests from 8 test cases.
[----------] Global test environment set-up.
[----------] 1 test from CxxExceptionInConstructorTest
[ RUN      ] CxxExceptionInConstructorTest.ThrowsExceptionInConstructor
Abort trap

I'm happy to try more things if that'd help.

Can you try this with a debug version so one can see the stack traces? The easiest to do that should be adding -DCMAKE_BUILD_TYPE=Debug to your cmake command line, then building the test again.

- Vlad

Pat Notz

unread,
Feb 28, 2011, 3:46:48 PM2/28/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Vlad Losev <vl...@google.com>:

> Pat,
>
> Thanks for your participation!
>
> 2011/2/28 Pat Notz <pat...@gmail.com>
>>
>> 2011/2/28 Zhanyong Wan (λx.x x) <w...@google.com>:
>> > On Mon, Feb 28, 2011 at 10:30 AM, Pat Notz <pat...@gmail.com> wrote:
>> >> MacOS 10.5.8 / Intel using GCC 4.5.2 (from MacPorts):
>> >>
>> >> 95% tests passed, 2 tests failed out of 40
>> >>
>> >> Total Test time (real) =  14.84 sec
>> >>
>> >> The following tests FAILED:
>> >>         29 - gtest_catch_exceptions_test (Failed)
>
> gtest_catch_exceptions_test being a Python test, is easier to run via CTest:
>
> (after invoking make)
> ctest -R  gtest_catch_exceptions_test --output-on-failure
>

$ ctest -R gtest_catch_exceptions_test --output-on-failure
Test project /Users/pknotz/workspace/gtest-1.6.0/build
Start 29: gtest_catch_exceptions_test
1/1 Test #29: gtest_catch_exceptions_test ......***Failed 5.04 sec
FFFFFFFF.
======================================================================
FAIL: testCatchesCxxExceptionsInFixtureConstructor
(__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 114, in testCatchesCxxExceptionsInFixtureConstructor
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesCxxExceptionsInFixtureDestructor
(__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 124, in testCatchesCxxExceptionsInFixtureDestructor
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesCxxExceptionsInSetUp (__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 160, in testCatchesCxxExceptionsInSetUp
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesCxxExceptionsInSetUpTestCase (__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 132, in testCatchesCxxExceptionsInSetUpTestCase
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesCxxExceptionsInTearDown (__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 178, in testCatchesCxxExceptionsInTearDown
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesCxxExceptionsInTearDownTestCase
(__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 155, in testCatchesCxxExceptionsInTearDownTestCase
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesCxxExceptionsInTestBody (__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 189, in testCatchesCxxExceptionsInTestBody
in EX_BINARY_OUTPUT)
AssertionError: False is not True

======================================================================
FAIL: testCatchesNonStdCxxExceptions (__main__.CatchCxxExceptionsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test.py",
line 202, in testCatchesNonStdCxxExceptions
in EX_BINARY_OUTPUT)
AssertionError: False is not True

----------------------------------------------------------------------
Ran 9 tests in 0.015s

FAILED (failures=8)


0% tests passed, 1 tests failed out of 1

Total Test time (real) = 5.10 sec

The following tests FAILED:
29 - gtest_catch_exceptions_test (Failed)

Errors while running CTest


>> >>         19 - gtest_throw_on_failure_ex_test (OTHER_FAULT)
>> >> Errors while running CTest
>> >>
>> >>
>> >> I'm willing to supply more information if anyone has suggestions for
>> >> the best way to do that.
>> >>
>> >> Thanks ~ Pat
>> >
>> > You can run the failed test programs manually and copy-n-paste their
>> > entire output.  That would be really helpful for us to understand the
>> > problem.  Thanks!
>> >
>>
>> $ ./gtest_throw_on_failure_ex_test
>>
>> /Users/pknotz/workspace/gtest-1.6.0/test/gtest_throw_on_failure_ex_test.cc:65:
>> Failure
>> Value of: 3
>> Expected: 2
>> Expected failure
>> Abort trap
>>
>>  ./gtest_catch_exceptions_ex_test_
>> [==========] Running 8 tests from 8 test cases.
>> [----------] Global test environment set-up.
>> [----------] 1 test from CxxExceptionInConstructorTest
>> [ RUN      ] CxxExceptionInConstructorTest.ThrowsExceptionInConstructor
>> Abort trap
>>

> Can you try this with a debug version so one can see the stack traces? The
> easiest to do that should be adding -DCMAKE_BUILD_TYPE=Debug to your cmake
> command line, then building the test again.
>

Hmmm, the output was the same. I'm trying to run it in DDD but I'm not
having much luck.

Pat Notz

unread,
Feb 28, 2011, 5:04:33 PM2/28/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Pat Notz <pat...@gmail.com>:

>>>  ./gtest_catch_exceptions_ex_test_
>>> [==========] Running 8 tests from 8 test cases.
>>> [----------] Global test environment set-up.
>>> [----------] 1 test from CxxExceptionInConstructorTest
>>> [ RUN      ] CxxExceptionInConstructorTest.ThrowsExceptionInConstructor
>>> Abort trap
>>>
>> Can you try this with a debug version so one can see the stack traces? The
>> easiest to do that should be adding -DCMAKE_BUILD_TYPE=Debug to your cmake
>> command line, then building the test again.
>>
>
> Hmmm, the output was the same. I'm trying to run it in DDD but I'm not
> having much luck.

Valgrind is able to spit out the stack:

$ valgrind --tool=memcheck ./gtest_catch_exceptions_ex_test_
==10882== Memcheck, a memory error detector
==10882== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==10882== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==10882== Command: ./gtest_catch_exceptions_ex_test_
==10882==
--10882-- ./gtest_catch_exceptions_ex_test_:
--10882-- dSYM directory is missing; consider using --dsymutil=yes


[==========] Running 8 tests from 8 test cases.
[----------] Global test environment set-up.
[----------] 1 test from CxxExceptionInConstructorTest
[ RUN ] CxxExceptionInConstructorTest.ThrowsExceptionInConstructor

==10882==
==10882== Process terminating with default action of signal 6 (SIGABRT)
==10882== at 0x264E42: __kill (in /usr/lib/libSystem.B.dylib)
==10882== by 0x2D7239: raise (in /usr/lib/libSystem.B.dylib)
==10882== by 0x2E3678: abort (in /usr/lib/libSystem.B.dylib)
==10882== by 0xCFA29: _Unwind_Resume (in /usr/lib/libgcc_s.1.dylib)
==10882== by 0x6174:
testing::internal::TestFactoryImpl<CxxExceptionInConstructorTest_ThrowsExceptionInConstructor_Test>::CreateTest()
(in ./gtest_catch_exceptions_ex_test_)
==10882== by 0x21D08: testing::Test*
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,
testing::Test*>(testing::internal::TestFactoryBase*, testing::Test*
(testing::internal::TestFactoryBase::*)(), char const*) (in
./gtest_catch_exceptions_ex_test_)
==10882== by 0x1D8D2: testing::Test*
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,
testing::Test*>(testing::internal::TestFactoryBase*, testing::Test*
(testing::internal::TestFactoryBase::*)(), char const*) (in
./gtest_catch_exceptions_ex_test_)
==10882== by 0xBC8E: testing::TestInfo::Run() (in
./gtest_catch_exceptions_ex_test_)
==10882== by 0xC460: testing::TestCase::Run() (in
./gtest_catch_exceptions_ex_test_)
==10882== by 0x11085:
testing::internal::UnitTestImpl::RunAllTests() (in
./gtest_catch_exceptions_ex_test_)
==10882== by 0x22D84: bool
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool
(testing::internal::UnitTestImpl::*)(), char const*) (in
./gtest_catch_exceptions_ex_test_)
==10882== by 0x1E2B2: bool
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool
(testing::internal::UnitTestImpl::*)(), char const*) (in
./gtest_catch_exceptions_ex_test_)
==10882==
==10882== HEAP SUMMARY:
==10882== in use at exit: 22,442 bytes in 114 blocks
==10882== total heap usage: 434 allocs, 320 frees, 81,414 bytes allocated
==10882==
==10882== LEAK SUMMARY:
==10882== definitely lost: 0 bytes in 0 blocks
==10882== indirectly lost: 0 bytes in 0 blocks
==10882== possibly lost: 782 bytes in 19 blocks
==10882== still reachable: 21,216 bytes in 85 blocks
==10882== suppressed: 444 bytes in 10 blocks
==10882== Rerun with --leak-check=full to see details of leaked memory
==10882==
==10882== For counts of detected and suppressed errors, rerun with: -v
==10882== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Abort trap

Cheers ~ Pat

Pat Notz

unread,
Feb 28, 2011, 6:25:22 PM2/28/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Vlad Losev <vl...@google.com>:
>
>
> 2011/2/28 Pat Notz <pat...@gmail.com>
> Hrm. It looks like both in this test and and in gtest_catch_exceptions_test
> gtest does not actually catch C++ exceptions. Can you verify the flags that
> make passes to GCC for this binary? -fexceptions should be among them.
>

Yeah, it looks like it's there. From "make VERBOSE=1":

[ 31%] Building CXX object
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/test/gtest_catch_exceptions_test_.cc.o
/opt/local/bin/c++ -g -I/Users/pknotz/workspace/gtest-1.6.0/include
-I/Users/pknotz/workspace/gtest-1.6.0 -Wall -Wshadow
-DGTEST_HAS_PTHREAD=1 -fexceptions -o
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/test/gtest_catch_exceptions_test_.cc.o
-c /Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test_.cc
Linking CXX executable gtest_catch_exceptions_ex_test_
/opt/local/bin/cmake -E cmake_link_script
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/link.txt --verbose=1
/opt/local/bin/c++ -g -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/test/gtest_catch_exceptions_test_.cc.o
-o gtest_catch_exceptions_ex_test_
-L/Users/pknotz/workspace/gtest-1.6.0/build/src libgtest_main.a
libgtest.a -lpthread

I have several other compilers installed. I'll try them and report back.

Pat Notz

unread,
Feb 28, 2011, 7:28:10 PM2/28/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Pat Notz <pat...@gmail.com>:

> I have several other compilers installed. I'll try them and report back.

Same machine (MacOS 10.5.8/Intel) but with GCC 4.4.5 out of MacPorts:

100% tests passed, 0 tests failed out of 40


I'm not sure, exactly, what that tells me but it's interesting
nonetheless. I'll try this with GCC 4.5.x and gtest-1.5.0 --
presumable 1.5.0 has the same or similar test.

~ Pat

Vlad Losev

unread,
Feb 28, 2011, 8:18:50 PM2/28/11
to Pat Notz, Zhanyong Wan (λx.x x), Google C++ Testing Framework


2011/2/28 Pat Notz <pat...@gmail.com>

C++ exception handling, along with this test, was added after release 1.5.

Anyway I see three possibilities here:
  1. gtest's exception support detection is broken on this compiler.
  2. there is a flaw in gtest's exception logic that is reproducible only on this compiler
  3. the exception support is somehow broken in the compiler
You can distinguish between (1) and (2)/(3) by forcing the test and the library to compile with the exception support (by using the preprocessor definition -DGTEST_HAS_EXCEPTIONS=1) in the debug mode. The line numbers in the stack trace (in
HandleExceptionsInMethodIfSupported) will tell you whether the exception-supporting branch was compiled.

I am not sure how to distinguish between (2) and (3), though.

  ~ Pat

Regards,
Vlad

Pat Notz

unread,
Feb 28, 2011, 8:49:24 PM2/28/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Vlad Losev <vl...@google.com>:

It looks to me like it's either (2) or (3). In case I'm doing
something stupid, here are the commands I ran and their output.
Unfortunately I'm not able to get a stacktrace.

$ g++ --version
g++ (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pknotz@s919422: ~/workspace/gtest-1.6.0/build
$ rm -f CMakeCache.txt

$ cmake .. -Dgtest_build_tests=ON -Dgtest_build_samples=ON
-DCMAKE_CXX_FLAGS="-DGTEST_HAS_EXCEPTIONS=1"
-DCMAKE_C_FLAGS="-DGTEST_HAS_EXCEPTIONS=1" -DCMAKE_BUILD_TYPE=Debug
-- The CXX compiler identification is GNU
-- The C compiler identification is GNU
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found PythonInterp: /opt/local/bin/python2.7
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/pknotz/workspace/gtest-1.6.0/build

$ make clean

$ make VERBOSE=1 gtest_catch_exceptions_ex_test_
/opt/local/bin/cmake -H/Users/pknotz/workspace/gtest-1.6.0
-B/Users/pknotz/workspace/gtest-1.6.0/build --check-build-system
CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 gtest_catch_exceptions_ex_test_
/opt/local/bin/cmake -H/Users/pknotz/workspace/gtest-1.6.0
-B/Users/pknotz/workspace/gtest-1.6.0/build --check-build-system
CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 3
make -f CMakeFiles/Makefile2 CMakeFiles/gtest_catch_exceptions_ex_test_.dir/all
make -f CMakeFiles/gtest.dir/build.make CMakeFiles/gtest.dir/depend
cd /Users/pknotz/workspace/gtest-1.6.0/build && /opt/local/bin/cmake
-E cmake_depends "Unix Makefiles" /Users/pknotz/workspace/gtest-1.6.0
/Users/pknotz/workspace/gtest-1.6.0
/Users/pknotz/workspace/gtest-1.6.0/build
/Users/pknotz/workspace/gtest-1.6.0/build
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/gtest.dir/DependInfo.cmake
--color=
Dependee "/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/gtest.dir/depend.internal".
Scanning dependencies of target gtest
make -f CMakeFiles/gtest.dir/build.make CMakeFiles/gtest.dir/build
/opt/local/bin/cmake -E cmake_progress_report
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 1
[ 33%] Building CXX object CMakeFiles/gtest.dir/src/gtest-all.cc.o
/opt/local/bin/c++ -DGTEST_HAS_EXCEPTIONS=1 -g
-I/Users/pknotz/workspace/gtest-1.6.0/include
-I/Users/pknotz/workspace/gtest-1.6.0 -DGTEST_HAS_EXCEPTIONS=1 -Wall
-Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -o
CMakeFiles/gtest.dir/src/gtest-all.cc.o -c
/Users/pknotz/workspace/gtest-1.6.0/src/gtest-all.cc
Linking CXX static library libgtest.a
/opt/local/bin/cmake -P CMakeFiles/gtest.dir/cmake_clean_target.cmake
/opt/local/bin/cmake -E cmake_link_script
CMakeFiles/gtest.dir/link.txt --verbose=1
/usr/bin/ar cr libgtest.a CMakeFiles/gtest.dir/src/gtest-all.cc.o
/usr/bin/ranlib libgtest.a
/opt/local/bin/cmake -E cmake_progress_report
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 1
[ 33%] Built target gtest
make -f CMakeFiles/gtest_main.dir/build.make CMakeFiles/gtest_main.dir/depend
cd /Users/pknotz/workspace/gtest-1.6.0/build && /opt/local/bin/cmake
-E cmake_depends "Unix Makefiles" /Users/pknotz/workspace/gtest-1.6.0
/Users/pknotz/workspace/gtest-1.6.0
/Users/pknotz/workspace/gtest-1.6.0/build
/Users/pknotz/workspace/gtest-1.6.0/build
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/gtest_main.dir/DependInfo.cmake
--color=
Dependee "/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/gtest_main.dir/depend.internal".
Scanning dependencies of target gtest_main
make -f CMakeFiles/gtest_main.dir/build.make CMakeFiles/gtest_main.dir/build
/opt/local/bin/cmake -E cmake_progress_report
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 31
[ 66%] Building CXX object CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
/opt/local/bin/c++ -DGTEST_HAS_EXCEPTIONS=1 -g
-I/Users/pknotz/workspace/gtest-1.6.0/include
-I/Users/pknotz/workspace/gtest-1.6.0 -DGTEST_HAS_EXCEPTIONS=1 -Wall
-Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -o
CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -c
/Users/pknotz/workspace/gtest-1.6.0/src/gtest_main.cc
Linking CXX static library libgtest_main.a
/opt/local/bin/cmake -P CMakeFiles/gtest_main.dir/cmake_clean_target.cmake
/opt/local/bin/cmake -E cmake_link_script
CMakeFiles/gtest_main.dir/link.txt --verbose=1
/usr/bin/ar cr libgtest_main.a CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
/usr/bin/ranlib libgtest_main.a
/opt/local/bin/cmake -E cmake_progress_report
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 31
[ 66%] Built target gtest_main
make -f CMakeFiles/gtest_catch_exceptions_ex_test_.dir/build.make
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/depend
cd /Users/pknotz/workspace/gtest-1.6.0/build && /opt/local/bin/cmake
-E cmake_depends "Unix Makefiles" /Users/pknotz/workspace/gtest-1.6.0
/Users/pknotz/workspace/gtest-1.6.0
/Users/pknotz/workspace/gtest-1.6.0/build
/Users/pknotz/workspace/gtest-1.6.0/build
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/gtest_catch_exceptions_ex_test_.dir/DependInfo.cmake
--color=
Dependee "/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles/gtest_catch_exceptions_ex_test_.dir/depend.internal".
Scanning dependencies of target gtest_catch_exceptions_ex_test_
make -f CMakeFiles/gtest_catch_exceptions_ex_test_.dir/build.make
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/build
/opt/local/bin/cmake -E cmake_progress_report
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 20
[100%] Building CXX object
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/test/gtest_catch_exceptions_test_.cc.o
/opt/local/bin/c++ -DGTEST_HAS_EXCEPTIONS=1 -g
-I/Users/pknotz/workspace/gtest-1.6.0/include
-I/Users/pknotz/workspace/gtest-1.6.0 -DGTEST_HAS_EXCEPTIONS=1 -Wall


-Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -o
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/test/gtest_catch_exceptions_test_.cc.o
-c /Users/pknotz/workspace/gtest-1.6.0/test/gtest_catch_exceptions_test_.cc
Linking CXX executable gtest_catch_exceptions_ex_test_
/opt/local/bin/cmake -E cmake_link_script
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/link.txt --verbose=1

/opt/local/bin/c++ -DGTEST_HAS_EXCEPTIONS=1 -g


-Wl,-search_paths_first -Wl,-headerpad_max_install_names
CMakeFiles/gtest_catch_exceptions_ex_test_.dir/test/gtest_catch_exceptions_test_.cc.o
-o gtest_catch_exceptions_ex_test_
-L/Users/pknotz/workspace/gtest-1.6.0/build/src libgtest_main.a
libgtest.a -lpthread

/opt/local/bin/cmake -E cmake_progress_report
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 20
[100%] Built target gtest_catch_exceptions_ex_test_
/opt/local/bin/cmake -E cmake_progress_start
/Users/pknotz/workspace/gtest-1.6.0/build/CMakeFiles 0

$ ./gtest_catch_exceptions_ex_test_

Pat Notz

unread,
Feb 28, 2011, 11:05:29 PM2/28/11
to Vlad Losev, Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/28 Vlad Losev <vl...@google.com>:

Okay, I tried this on my home laptop: MacOS 10.6.6/Intel with GCC
4.5.2 from MacPorts:

100% tests passed, 0 tests failed out of 40

This makes me suspect that there's a problem with the MacPorts
installation on my first laptop. Perhaps some shared library built
with a different version of GCC. Anyway, it looks like it's my
problem.

I sincerely apologize for the false alarm.

Best ~ Pat

MATSUMOTO Eiji

unread,
Mar 1, 2011, 9:23:47 PM3/1/11
to Google C++ Testing Framework
Thank you!
All tests passed.

Josh Kelley

unread,
Mar 1, 2011, 11:38:14 PM3/1/11
to Zhanyong Wan (λx.x x), Google C++ Testing Framework
2011/2/24 Zhanyong Wan (λx.x x) <w...@google.com>

We plan to release Google Test 1.6.0 in the next few days.  We need
your help to make it successful.

Updates for CodeGear / Embarcadero C++Builder are attached.  (Are you still using Rietveld for patch submissions?)

--
Josh Kelley
gtest-1.6.0-codegear.patch

Zhanyong Wan (λx.x x)

unread,
Mar 4, 2011, 5:01:01 PM3/4/11
to Joanna Biernat-Gerono, Google C++ Testing Framework
(Adding back the list -- please keep the discussion on the mailing
list. Thanks.)

2011/2/25 Joanna Biernat-Gerono <jbierna...@gmail.com>:
>
>
> 2011/2/25 Zhanyong Wan (λx.x x) <w...@google.com>


>>
>> Hi Joanna,
>>
>> 2011/2/25 Joanna Biernat-Gerono <jbierna...@gmail.com>:
>> > Hi,
>> >
>> > I have a question about official support for Microsoft Visual Studio
>> > 2010
>> > (ver. 10). At the moment you wrote that any version above 7.1 or newer
>> > is
>> > supported however when I open the *.vcproj projects with my VS version
>> > they
>> > get converted to *.vcxproj with some warnings and I am not sure how this
>> > conversion impacts gtest.
>> > I already asked for some explanation on
>> > googletes...@googlegroups.com
>> > but did not receive any response so far.
>> >
>> > I would really appreciate your advise.
>>
>> You should be able to ignore the warnings if the library and your
>> tests compile and run fine.
>>
>> We are not actively working on gtest's build systems.  If someone
>> wants to contribute VS 2010 projects, a patch is welcome.  Thanks,
>>

>  Hi,
>
> many thanks for your reply, I am considering being contributor and will make
> my decision soon.
>
> Just to let you know everything was fine until I tried to compile the
> project in debug mode, it turned out to be impossible to resolve libraries
> dependecies.

More details? Does anyone else see this?

>
> Thanks,
> Joanna
>
>

--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Mar 4, 2011, 5:12:13 PM3/4/11
to Chris Kilner, Google C++ Testing Framework
Chris,

On Sat, Feb 26, 2011 at 9:46 AM, Chris Kilner <cjp.k...@gmail.com> wrote:
> All tests pass in:
> VS2010 / VS2008 , debug / release, gtest.sln / gtest-md.sln
> It may be worth mentioning, that since VS needs to 'upgrade' the projects,
> users currently need to change the settings of the msvc directory so that it
> is not read-only before attempting to open in VS.
> Hope this helps,

Thanks for testing it and sharing the tip!

> Chris
>
>>
>> On 2月25日, 午前6:16, Zhanyong Wan (λx.x x) <w...@google.com> wrote:
>> > Dear users of Google Test,
>> >
>> > We plan to release Google Test 1.6.0 in the next few days.  We need
>> > your help to make it successful.
>> >
>> > I've uploaded a release candidate
>> > tohttp://code.google.com/p/googletest/downloads/detail?name=gtest-1.6.0...
>> > -- please download it, try it, and report any problems (patches are
>> > even better), especially if your platform isn't official supported
>> > (i.e. anything outside of Windows, Mac OS X, and Linux).  I have only
>> > had time to test it on Linux.
>> >
>> > Thanks,
>> > --
>> > Zhanyong
>
>

--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Mar 4, 2011, 5:13:59 PM3/4/11
to Pat Notz, Vlad Losev, Google C++ Testing Framework

No worries, Pat. Thanks for helping us test it!

>
> Best ~ Pat
>

--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Mar 4, 2011, 5:55:43 PM3/4/11
to Josh Kelley, Google C++ Testing Framework
2011/3/1 Josh Kelley <jos...@gmail.com>:

Yes, we are stilling using Rietveld. I'm working on incorporating
your patch into gtest. Will let you know if I need help. Thanks,

>
> --
> Josh Kelley
>

--
Zhanyong

Reply all
Reply to author
Forward
0 new messages