OpenShot Library | OpenShotAudio 0.2.2
juce::dsp::FFTUnitTest Struct Reference
+ Inheritance diagram for juce::dsp::FFTUnitTest:

Classes

struct  ComplexTest
 
struct  FrequencyOnlyTest
 
struct  RealTest
 

Public Member Functions

template<class TheTest >
void runTestForAllTypes (const char *unitTestName)
 
void runTest () override
 Implement this method in your subclass to actually run your tests. More...
 
- Public Member Functions inherited from juce::UnitTest
 UnitTest (const String &name, const String &category=String())
 Creates a test with the given name and optionally places it in a category. More...
 
virtual ~UnitTest ()
 Destructor. More...
 
const StringgetName () const noexcept
 Returns the name of the test. More...
 
const StringgetCategory () const noexcept
 Returns the category of the test. More...
 
void performTest (UnitTestRunner *runner)
 Runs the test, using the specified UnitTestRunner. More...
 
virtual void initialise ()
 You can optionally implement this method to set up your test. More...
 
virtual void shutdown ()
 You can optionally implement this method to clear up after your test has been run. More...
 
virtual void runTest ()=0
 Implement this method in your subclass to actually run your tests. More...
 
void beginTest (const String &testName)
 Tells the system that a new subsection of tests is beginning. More...
 
void expect (bool testResult, const String &failureMessage=String())
 Checks that the result of a test is true, and logs this result. More...
 
template<class ValueType >
void expectEquals (ValueType actual, ValueType expected, String failureMessage=String())
 Compares a value to an expected value. More...
 
template<class ValueType >
void expectNotEquals (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
 Checks whether a value is not equal to a comparison value. More...
 
template<class ValueType >
void expectGreaterThan (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
 Checks whether a value is greater than a comparison value. More...
 
template<class ValueType >
void expectLessThan (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
 Checks whether a value is less than a comparison value. More...
 
template<class ValueType >
void expectGreaterOrEqual (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
 Checks whether a value is greater or equal to a comparison value. More...
 
template<class ValueType >
void expectLessOrEqual (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
 Checks whether a value is less or equal to a comparison value. More...
 
template<class ValueType >
void expectWithinAbsoluteError (ValueType actual, ValueType expected, ValueType maxAbsoluteError, String failureMessage=String())
 Computes the difference between a value and a comparison value, and if it is larger than a specified maximum value, prints out a message containing the actual and comparison values and the maximum allowed error. More...
 
void logMessage (const String &message)
 Writes a message to the test log. More...
 
Random getRandom () const
 Returns a shared RNG that all unit tests should use. More...
 

Static Public Member Functions

static void fillRandom (Random &random, Complex< float > *buffer, size_t n)
 
static void fillRandom (Random &random, float *buffer, size_t n)
 
static Complex< float > freqConvolution (const Complex< float > *in, float freq, size_t n)
 
static void performReferenceFourier (const Complex< float > *in, Complex< float > *out, size_t n, bool reverse)
 
static void performReferenceFourier (const float *in, Complex< float > *out, size_t n, bool reverse)
 
template<typename Type >
static bool checkArrayIsSimilar (Type *a, Type *b, size_t n) noexcept
 
- Static Public Member Functions inherited from juce::UnitTest
static Array< UnitTest * > & getAllTests ()
 Returns the set of all UnitTest objects that currently exist. More...
 
static Array< UnitTest * > getTestsInCategory (const String &category)
 Returns the set of UnitTests in a specified category. More...
 
static StringArray getAllCategories ()
 Returns a StringArray containing all of the categories of UnitTests that have been registered. More...
 

Detailed Description

Definition at line 32 of file juce_FFT_test.cpp.

Constructor & Destructor Documentation

◆ FFTUnitTest()

juce::dsp::FFTUnitTest::FFTUnitTest ( )
inline

Definition at line 34 of file juce_FFT_test.cpp.

Member Function Documentation

◆ fillRandom() [1/2]

static void juce::dsp::FFTUnitTest::fillRandom ( Random random,
Complex< float > *  buffer,
size_t  n 
)
inlinestatic

Definition at line 38 of file juce_FFT_test.cpp.

◆ fillRandom() [2/2]

static void juce::dsp::FFTUnitTest::fillRandom ( Random random,
float *  buffer,
size_t  n 
)
inlinestatic

Definition at line 45 of file juce_FFT_test.cpp.

◆ freqConvolution()

static Complex< float > juce::dsp::FFTUnitTest::freqConvolution ( const Complex< float > *  in,
float  freq,
size_t  n 
)
inlinestatic

Definition at line 51 of file juce_FFT_test.cpp.

◆ performReferenceFourier() [1/2]

static void juce::dsp::FFTUnitTest::performReferenceFourier ( const Complex< float > *  in,
Complex< float > *  out,
size_t  n,
bool  reverse 
)
inlinestatic

Definition at line 60 of file juce_FFT_test.cpp.

◆ performReferenceFourier() [2/2]

static void juce::dsp::FFTUnitTest::performReferenceFourier ( const float *  in,
Complex< float > *  out,
size_t  n,
bool  reverse 
)
inlinestatic

Definition at line 70 of file juce_FFT_test.cpp.

◆ checkArrayIsSimilar()

template<typename Type >
static bool juce::dsp::FFTUnitTest::checkArrayIsSimilar ( Type *  a,
Type *  b,
size_t  n 
)
inlinestaticnoexcept

Definition at line 88 of file juce_FFT_test.cpp.

◆ runTestForAllTypes()

template<class TheTest >
void juce::dsp::FFTUnitTest::runTestForAllTypes ( const char *  unitTestName)
inline

Definition at line 197 of file juce_FFT_test.cpp.

◆ runTest()

void juce::dsp::FFTUnitTest::runTest ( )
inlineoverridevirtual

Implement this method in your subclass to actually run your tests.

The content of your implementation should call beginTest() and expect() to perform the tests.

Implements juce::UnitTest.

Definition at line 204 of file juce_FFT_test.cpp.


The documentation for this struct was generated from the following file: