All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
hext::NegateTest Class Referencefinal

Negates the result of another ValueTest. More...

Inheritance diagram for hext::NegateTest:
Inheritance graph
Collaboration diagram for hext::NegateTest:
Collaboration graph

Public Member Functions

 NegateTest (std::unique_ptr< ValueTest > value_test) noexcept
 Constructs a NegateTest. More...
 ~NegateTest () noexcept=default
 NegateTest (NegateTest &&other) noexcept=default
 NegateTest (const NegateTest &other)
NegateTestoperator= (NegateTest &&other) noexcept=default
NegateTestoperator= (const NegateTest &other)
bool test (const char *subject) const override
 Returns true if the given ValueTest fails for subject. More...
- Public Member Functions inherited from hext::Cloneable< NegateTest, ValueTest >
virtual std::unique_ptr
< ValueTest
clone () const
 Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. More...
- Public Member Functions inherited from hext::ValueTest
 ValueTest () noexcept=default
 ValueTest (const ValueTest &)=default
 ValueTest (ValueTest &&) noexcept=default
ValueTestoperator= (const ValueTest &)=default
ValueTestoperator= (ValueTest &&) noexcept=default
virtual ~ValueTest () noexcept=default

Detailed Description

Negates the result of another ValueTest.

NegateTest not_foo(std::make_unique<EqualsTest>("foo"));
assert( not_foo.test("bar"));
assert( not_foo.test("baz"));

Definition at line 41 of file NegateTest.h.

Constructor & Destructor Documentation

hext::NegateTest::NegateTest ( std::unique_ptr< ValueTest value_test)

Constructs a NegateTest.

value_testThe ValueTest a subject has to fail.
hext::NegateTest::~NegateTest ( )
hext::NegateTest::NegateTest ( NegateTest &&  other)
hext::NegateTest::NegateTest ( const NegateTest other)

Member Function Documentation

NegateTest& hext::NegateTest::operator= ( NegateTest &&  other)
NegateTest& hext::NegateTest::operator= ( const NegateTest other)
bool hext::NegateTest::test ( const char *  subject) const

Returns true if the given ValueTest fails for subject.

subjectThe string that is to be tested.

Implements hext::ValueTest.

The documentation for this class was generated from the following file: