mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
Attempted fix for Travis build.
This commit is contained in:
parent
21589e5612
commit
bec6ba56ec
1 changed files with 22 additions and 22 deletions
|
|
@ -315,30 +315,30 @@ namespace {
|
|||
CHECK_EQUAL(1234, reporter.lastFailedLine);
|
||||
}
|
||||
|
||||
class TruthyUnlessCopied
|
||||
{
|
||||
public:
|
||||
TruthyUnlessCopied()
|
||||
: truthy_(true)
|
||||
{
|
||||
}
|
||||
|
||||
TruthyUnlessCopied(const TruthyUnlessCopied& orig)
|
||||
: truthy_(false)
|
||||
{
|
||||
}
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
return truthy_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool truthy_;
|
||||
};
|
||||
|
||||
TEST(CheckProperlyDealsWithOperatorBoolOverrides)
|
||||
{
|
||||
class TruthyUnlessCopied
|
||||
{
|
||||
public:
|
||||
TruthyUnlessCopied()
|
||||
: truthy_(true)
|
||||
{
|
||||
}
|
||||
|
||||
TruthyUnlessCopied(const TruthyUnlessCopied& orig)
|
||||
: truthy_(false)
|
||||
{
|
||||
}
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
return truthy_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool truthy_;
|
||||
};
|
||||
|
||||
TruthyUnlessCopied objectThatShouldBeTruthy;
|
||||
CHECK(objectThatShouldBeTruthy);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue