All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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
[legend]
Collaboration diagram for hext::NegateTest:
Collaboration graph
[legend]

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.

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

Definition at line 40 of file NegateTest.h.

Constructor & Destructor Documentation

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

Constructs a NegateTest.

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

Member Function Documentation

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

Returns true if the given ValueTest fails for subject.

Parameters
subjectThe string that is to be tested.

Implements hext::ValueTest.


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