VST 3 SDK VST 3.7 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Namespaces | Macros | Typedefs | Functions
testing.h File Reference
`#include "pluginterfaces/test/itest.h"`
`#include <cmath>`
`#include <functional>`
`#include <limits>`

## Namespaces
namespace | Steinberg
namespace | Steinberg::Vst
namespace | Steinberg::Vst::Test

## Macros
#define | SMTG_MAKE_STRING_PRIVATE_DONT_USE(x)
#define | SMTG_MAKE_STRING(x)
#define | EXPECT(condition)
#define | EXPECT_TRUE(condition)
#define | EXPECT_FALSE(condition)
#define | EXPECT_EQ(var1, var2)
#define | EXPECT_NE(var1, var2)

## Typedefs
using | TestFunc = std::function<bool (ITestResult*)>
| simple test function
using | TestFuncWithContext = std::function<bool (FUnknown*, ITestResult*)>
| test function with context pointer

## Functions
FUnknown * | createTestFactoryInstance (void *)
| How to use the validator to run your own tests?
const FUID & | getTestFactoryUID ()
| get the test factory class ID
void | registerTest (FIDString name, const char *desc, const TestFunc &func)
| register a simple test function
void | registerTest (FIDString name, const char *desc, TestFunc &&func)
| register a simple test function
void | registerTest (FIDString name, const char *desc, const TestFuncWithContext &func)
| register a test function with context pointer
void | registerTest (FIDString name, const char *desc, TestFuncWithContext &&func)
| register a test function with context pointer
void | registerTest (FIDString name, ITest *test)
| register a custom test, the test object will be owned by the implementation
template<typename T, typename std::enable_if< std::is_floating_point< T >::value >::type * = nullptr>
constexpr bool | equal (const T &lhs, const T &rhs) noexcept
template<typename T>
constexpr bool | notEqual (const T &lhs, const T &rhs) noexcept
template<typename T>
constexpr bool | maxDiff (const T &lhs, const T &rhs, const T &maxDiff) noexcept

## Macro Definition Documentation

## ◆ SMTG_MAKE_STRING_PRIVATE_DONT_USE

#define SMTG_MAKE_STRING_PRIVATE_DONT_USE | ( |  | x | ) |

Value:
#x

## ◆ SMTG_MAKE_STRING

#define SMTG_MAKE_STRING | ( |  | x | ) |

Value:
SMTG_MAKE_STRING_PRIVATE_DONT_USE (x)
SMTG_MAKE_STRING_PRIVATE_DONT_USE
#define SMTG_MAKE_STRING_PRIVATE_DONT_USE(x)
Definition testing.h:191

## ◆ EXPECT

#define EXPECT | ( |  | condition | ) |

Value:
{ \
if (!(condition)) \
{ \
testResult->addErrorMessage (STR (__FILE__ ":" SMTG_MAKE_STRING ( \
__LINE__) ": error: " SMTG_MAKE_STRING (condition))); \
return false; \
} \
}
STR
#define STR(x)
SMTG_MAKE_STRING
#define SMTG_MAKE_STRING(x)
Definition testing.h:192

## ◆ EXPECT_TRUE

#define EXPECT_TRUE | ( |  | condition | ) |

Value:
EXPECT (condition)
EXPECT
#define EXPECT(condition)
Definition testing.h:195

## ◆ EXPECT_FALSE

#define EXPECT_FALSE | ( |  | condition | ) |

Value:
EXPECT (!condition)

## ◆ EXPECT_EQ

#define EXPECT_EQ | ( |  | var1,
|  |  | var2 )

Value:
EXPECT ((var1 == var2))

## ◆ EXPECT_NE

#define EXPECT_NE | ( |  | var1,
|  |  | var2 )

Value:
EXPECT ((var1 != var2))
Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.