LMMS
Loading...
Searching...
No Matches
juce::dsp::AudioBlockUnitTests< SampleType > Class Template Reference
Inheritance diagram for juce::dsp::AudioBlockUnitTests< SampleType >:
juce::UnitTest

Public Types

using NumericType = typename SampleTypeHelpers::ElementType<SampleType>::Type

Public Member Functions

 AudioBlockUnitTests ()
 ~AudioBlockUnitTests () override
void runTest () override
Public Member Functions inherited from juce::UnitTest
 UnitTest (const String &name, const String &category=String())
virtual ~UnitTest ()
const StringgetName () const noexcept
const StringgetCategory () const noexcept
void performTest (UnitTestRunner *runner)
virtual void initialise ()
virtual void shutdown ()
void beginTest (const String &testName)
void expect (bool testResult, const String &failureMessage=String())
template<class ValueType>
void expectEquals (ValueType actual, ValueType expected, String failureMessage=String())
template<class ValueType>
void expectNotEquals (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
template<class ValueType>
void expectGreaterThan (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
template<class ValueType>
void expectLessThan (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
template<class ValueType>
void expectGreaterOrEqual (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
template<class ValueType>
void expectLessOrEqual (ValueType value, ValueType valueToCompareTo, String failureMessage=String())
template<class ValueType>
void expectWithinAbsoluteError (ValueType actual, ValueType expected, ValueType maxAbsoluteError, String failureMessage=String())
void logMessage (const String &message)
Random getRandom () const

Private Types

template<typename T>
using ScalarVoid = typename std::enable_if_t < std::is_scalar <T>::value, void>
template<typename T>
using SIMDVoid = typename std::enable_if_t <! std::is_scalar <T>::value, void>

Private Member Functions

template<typename T = SampleType>
ScalarVoid< T > copyingTests ()
template<typename T = SampleType>
ScalarVoid< T > smoothedValueTests ()
template<typename T = SampleType>
SIMDVoid< T > smoothedValueTests ()
void resetBlocks ()
void deallocateAlignedMemory (void *address)

Static Private Member Functions

static SampleType * allocateAlignedMemory (int numSamplesToAllocate)

Private Attributes

std::array< SampleType *, numChannelsdata
std::array< SampleType *, numChannelsotherData
AudioBlock< SampleType > block
AudioBlock< SampleType > otherBlock

Static Private Attributes

static constexpr int numChannels = 2
static constexpr int numSamples = 6

Additional Inherited Members

Static Public Member Functions inherited from juce::UnitTest
static Array< UnitTest * > & getAllTests ()
static Array< UnitTest * > getTestsInCategory (const String &category)
static StringArray getAllCategories ()

Member Typedef Documentation

◆ NumericType

template<typename SampleType>
using juce::dsp::AudioBlockUnitTests< SampleType >::NumericType = typename SampleTypeHelpers::ElementType<SampleType>::Type

◆ ScalarVoid

template<typename SampleType>
template<typename T>
using juce::dsp::AudioBlockUnitTests< SampleType >::ScalarVoid = typename std::enable_if_t < std::is_scalar <T>::value, void>
private

◆ SIMDVoid

template<typename SampleType>
template<typename T>
using juce::dsp::AudioBlockUnitTests< SampleType >::SIMDVoid = typename std::enable_if_t <! std::is_scalar <T>::value, void>
private

Constructor & Destructor Documentation

◆ AudioBlockUnitTests()

template<typename SampleType>
juce::dsp::AudioBlockUnitTests< SampleType >::AudioBlockUnitTests ( )
inline

◆ ~AudioBlockUnitTests()

template<typename SampleType>
juce::dsp::AudioBlockUnitTests< SampleType >::~AudioBlockUnitTests ( )
inlineoverride

Member Function Documentation

◆ allocateAlignedMemory()

template<typename SampleType>
SampleType * juce::dsp::AudioBlockUnitTests< SampleType >::allocateAlignedMemory ( int numSamplesToAllocate)
inlinestaticprivate

◆ copyingTests()

template<typename SampleType>
template<typename T = SampleType>
ScalarVoid< T > juce::dsp::AudioBlockUnitTests< SampleType >::copyingTests ( )
inlineprivate

◆ deallocateAlignedMemory()

template<typename SampleType>
void juce::dsp::AudioBlockUnitTests< SampleType >::deallocateAlignedMemory ( void * address)
inlineprivate

◆ resetBlocks()

template<typename SampleType>
void juce::dsp::AudioBlockUnitTests< SampleType >::resetBlocks ( )
inlineprivate

◆ runTest()

template<typename SampleType>
void juce::dsp::AudioBlockUnitTests< SampleType >::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.

◆ smoothedValueTests() [1/2]

template<typename SampleType>
template<typename T = SampleType>
SIMDVoid< T > juce::dsp::AudioBlockUnitTests< SampleType >::smoothedValueTests ( )
inlineprivate

◆ smoothedValueTests() [2/2]

template<typename SampleType>
template<typename T = SampleType>
ScalarVoid< T > juce::dsp::AudioBlockUnitTests< SampleType >::smoothedValueTests ( )
inlineprivate

Member Data Documentation

◆ block

template<typename SampleType>
AudioBlock<SampleType> juce::dsp::AudioBlockUnitTests< SampleType >::block
private

◆ data

template<typename SampleType>
std::array<SampleType*, numChannels> juce::dsp::AudioBlockUnitTests< SampleType >::data
private

◆ numChannels

template<typename SampleType>
int juce::dsp::AudioBlockUnitTests< SampleType >::numChannels = 2
staticconstexprprivate

◆ numSamples

template<typename SampleType>
int juce::dsp::AudioBlockUnitTests< SampleType >::numSamples = 6
staticprivate

◆ otherBlock

template<typename SampleType>
AudioBlock<SampleType> juce::dsp::AudioBlockUnitTests< SampleType >::otherBlock
private

◆ otherData

template<typename SampleType>
std::array<SampleType*, numChannels> juce::dsp::AudioBlockUnitTests< SampleType >::otherData
private

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