psmason / googletest

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

Documentation for AssertionResult doesn't match implementation. #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The AssertionResult documentation shows these two syntaxes:

    return ::testing::AssertionSuccess() << "success message";
    return ::testing::AssertionFailure() << "failure message";

The first one is entirely impossible; testing::AssertionResult defines no
operator<<(). The second one is incorrect, as AssertionFailure() takes a
Message parameter. The correct syntax is:

    return ::testing::AssertionFailure(Message() << "failure message");

Original issue reported on code.google.com by ameaijou@gmail.com on 4 Jan 2010 at 3:11

GoogleCodeExporter commented 9 years ago
This is a new feature added after v1.4.0 was released.  Please try the head 
revision
in the trunk.  Note that the documentation says that this is available since 
v1.4.1,
which will be released in the near future.

Original comment by w...@google.com on 4 Jan 2010 at 5:22