Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QTest::ThrowOnFailEnabler Class Reference

#include <qtestcase.h>

Collaboration diagram for QTest::ThrowOnFailEnabler:

Public Member Functions

 ThrowOnFailEnabler ()
 Constructor.
 ~ThrowOnFailEnabler ()
 Destructor.

Detailed Description

Since
6.8 \macro QTEST_THROW_ON_FAIL

When defined, QCOMPARE()/QVERIFY() etc always throw on failure. QTest::setThrowOnFail() then no longer has any effect.

{return-void} {QCOMPARE() or QVERIFY()} {QCOMPARE()} {QTest::setThrowOnFail(true)}

Since
6.8 \macro QTEST_THROW_ON_SKIP

When defined, QSKIP() always throws. QTest::setThrowOnSkip() then no longer has any effect.

{return-void} {QSKIP()} {QSKIP()} {QTest::setThrowOnSkip(true)}

Since
6.8

\inmodule QtTestLib

RAII class around setThrowOnFail().

Definition at line 441 of file qtestcase.h.

Constructor & Destructor Documentation

◆ ThrowOnFailEnabler()

QTest::ThrowOnFailEnabler::ThrowOnFailEnabler ( )
inline

Constructor.

Calls {setThrowOnFail(true)}.

Definition at line 444 of file qtestcase.h.

◆ ~ThrowOnFailEnabler()

QTest::ThrowOnFailEnabler::~ThrowOnFailEnabler ( )
inline

Destructor.

Calls {setThrowOnFail(false)}.

Definition at line 445 of file qtestcase.h.


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