libhext: C++ Library Documentation  1.0.12-3ea013c
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 override=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< ValueTestclone () const override
 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"));
NegateTest(std::unique_ptr< ValueTest > value_test) noexcept
Constructs a NegateTest.

Definition at line 41 of file NegateTest.h.

Constructor & Destructor Documentation

◆ NegateTest() [1/3]

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

Constructs a NegateTest.

Parameters
value_testThe ValueTest a subject has to fail.

◆ ~NegateTest()

hext::NegateTest::~NegateTest ( )
overridedefaultnoexcept

◆ NegateTest() [2/3]

hext::NegateTest::NegateTest ( NegateTest &&  other)
defaultnoexcept

◆ NegateTest() [3/3]

hext::NegateTest::NegateTest ( const NegateTest other)

Member Function Documentation

◆ operator=() [1/2]

NegateTest& hext::NegateTest::operator= ( const NegateTest other)

◆ operator=() [2/2]

NegateTest& hext::NegateTest::operator= ( NegateTest &&  other)
defaultnoexcept

◆ test()

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: