VST 3 SDK: testing.h File Reference
Author: Steinberg

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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
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) #x
#define | SMTG_MAKE_STRING(x) SMTG_MAKE_STRING_PRIVATE_DONT_USE (x)
#define | EXPECT(condition)
#define | EXPECT_TRUE(condition) EXPECT (condition)
#define | EXPECT_FALSE(condition) EXPECT (!condition)
#define | EXPECT_EQ(var1, var2) EXPECT ((var1 == var2))
#define | EXPECT_NE(var1, var2) EXPECT ((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 *)
| create a Test Factory instance
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

#define SMTG_MAKE_STRING_PRIVATE_DONT_USE | ( |  | x | ) | #x

#define SMTG_MAKE_STRING | ( |  | x | ) | SMTG_MAKE_STRING_PRIVATE_DONT_USE (x)

#define EXPECT | ( |  | condition | ) |

Value:
{ \
if (!(condition)) \
{ \
testResult->addErrorMessage (STR (__FILE__ ":" SMTG_MAKE_STRING ( \
__LINE__) ": error: " SMTG_MAKE_STRING (condition))); \
return false; \
} \
}

#define EXPECT_TRUE | ( |  | condition | ) | EXPECT (condition)

#define EXPECT_FALSE | ( |  | condition | ) | EXPECT (!condition)

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

#define EXPECT_NE | ( |  | var1,
|  |  | var2
| ) |  | EXPECT ((var1 != var2))

Empty

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