Make checkBlackLists() return bool

Make checkBlackLists() return true if the test is blacklisted and false
otherwise.

Change-Id: Ief400a10a47ec7c21ea1d37fe75c7dc08739e06c
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Kalle Viironen 2023-08-28 10:44:58 +03:00
parent 90e1e1ee86
commit e51cd47ed3
2 changed files with 4 additions and 2 deletions

View File

@ -279,7 +279,8 @@ void parseBlackList()
}
}
void checkBlackLists(const char *slot, const char *data, const char *global)
// Returns \c true if this test-case is blacklisted.
bool checkBlackLists(const char *slot, const char *data, const char *global)
{
bool ignore = ignoreAll;
@ -302,6 +303,7 @@ void checkBlackLists(const char *slot, const char *data, const char *global)
}
QTestResult::setBlacklistCurrentTest(ignore);
return ignore;
}
} // QTestPrivate

View File

@ -23,7 +23,7 @@ QT_BEGIN_NAMESPACE
namespace QTestPrivate {
// Export functions so they can also be used by QQuickTest
Q_TESTLIB_EXPORT void parseBlackList();
Q_TESTLIB_EXPORT void checkBlackLists(const char *slot, const char *data,
Q_TESTLIB_EXPORT bool checkBlackLists(const char *slot, const char *data,
const char *global = nullptr);
}