Workspace 6.21.5
|
#include <algorithm>
#include <cmath>
#include <exception>
#include <fstream>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>
#include <qglobal.h>
#include "Workspace/Application/LanguageUtils/errorchecks.h"
#include "Workspace/DataExecution/Logging/logstream.h"
#include <QOpenGLContext>
#include "Application/LanguageUtils/streamqstring.h"
#include "DataExecution/DataObjects/datafactorytraits.h"
#include "DataExecution/InputOutput/input.h"
#include "DataExecution/InputOutput/output.h"
#include "DataExecution/Operations/operation.h"
#include "testoutputcapture.h"
Classes | |
class | MockLogStream |
class | TestSuite::TestCase< TestNum > |
Nested class template defining a test case for test TestNum. More... | |
class | TestHarness |
Basic test harness for running test cases. More... | |
class | TestSuite |
Class for implementing a suite of related tests. More... | |
Namespaces | |
namespace | CSIRO |
Top level namespace for all Workspace code. | |
namespace | CSIRO::Testing |
Namespace in which all testing code resides. | |
Macros | |
#define | assertTrue(value) |
#define | assertTrue1(value, msg) |
#define | failTest(msg) fail(failTestString(msg)) |
#define | failTestStep1(linenum, msg) failTestStep2(linenum, msg) |
#define | failTestStep2(linenum, msg) (std::string(__FILE__ "(" #linenum "): " + std::string(msg))) |
#define | failTestString(msg) failTestStep1(__LINE__, msg) |
#define | QSKIP_TEST(x) QSKIP(x, SkipAll) |
#define | QTEST_GUILESS_MAIN(TestObject) |
#define | WS_WORKAROUND_OPENGLCONTEXT() |
Functions | |
template<typename T > | |
bool | inputExists (const DataExecution::Operation &op, const QString &name, bool isScalar) |
template<typename T > | |
bool | outputExists (const DataExecution::Operation &op, const QString &name) |
Q_GUI_EXPORT void | qt_gl_set_global_share_context (QOpenGLContext *pContext) |
#define assertTrue | ( | value | ) |
#define assertTrue1 | ( | value, | |
msg | |||
) |
Convenience function for asserting that a value is true and failing the test if it isn't. Can provide a custom failure string if necessary.
Would be nice if we could change it to have useful auto-generated messages, but we're not able to make any assumptions about datatype, so it's not really possible.
#define failTest | ( | msg | ) | fail(failTestString(msg)) |
msg | The message to include in the output. |
Calls fail() with the file and line number preceding msg.
#define failTestStep1 | ( | linenum, | |
msg | |||
) | failTestStep2(linenum, msg) |
#define failTestStep2 | ( | linenum, | |
msg | |||
) | (std::string(__FILE__ "(" #linenum "): " + std::string(msg))) |
#define failTestString | ( | msg | ) | failTestStep1(__LINE__, msg) |
msg | The message to include in the output. |
Evaluates to a string containing the file and line number followed by msg.
#define QTEST_GUILESS_MAIN | ( | TestObject | ) |
#define WS_WORKAROUND_OPENGLCONTEXT | ( | ) |
Q_GUI_EXPORT void qt_gl_set_global_share_context | ( | QOpenGLContext * | pContext | ) |
This block of code is to eliminate crashes in tests with QTEST_GUILESS_MAIN with Qt 5.6.0. The QtWebEngineCore will initilize and access QGuiApplicationPrivate when the global share context is not set manually.