libhext: C++ Library Documentation  1.0.9-c8ac8b6
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 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.

NegateTest not_foo(std::make_unique<EqualsTest>("foo"));
assert( not_foo.test("bar"));
assert( not_foo.test("baz"));
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)

Constructs a NegateTest.

value_testThe ValueTest a subject has to fail.

◆ ~NegateTest()

hext::NegateTest::~NegateTest ( )

◆ NegateTest() [2/3]

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

◆ 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)

◆ test()

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: