67#define RUN_TEST(testfunc) UNITY_NEW_TEST(#testfunc) \
68 if (TEST_PROTECT()) { setUp(); testfunc(); } \
69 if (TEST_PROTECT() && (!TEST_IS_IGNORED)) {tearDown(); } \
70 UnityConcludeTest(); timerResult();
76 printf(
"Executing the Spatial_Audio_Framework unit testing program");
78 printf(
" (Release):\n");
80 printf(
" (Debug):\n");
151#if defined(SAF_ENABLE_SOFA_READER_MODULE)
158#ifdef SAF_ENABLE_TRACKER_MODULE
163#if defined(SAF_ENABLE_HADES_MODULE) && defined(SAF_ENABLE_SOFA_READER_MODULE)
175#ifdef SAF_ENABLE_EXAMPLES_TESTS
#define SAF_VERSION_BANNER
The Spatial_Audio_Framework Version and License as a banner.
#define SAF_EXTERNALS_CONFIGURATION_STRING
Current configuration information.
#define RUN_TEST(testfunc)
A custom Unity RUN_TEST, which calls timerResult() upon exiting each test.
static tick_t start
Start time for whole test program.
void setUp(void)
Called before each unit test is executed.
static void timerResult(void)
Displays the time taken to run the current unit test.
void tearDown(void)
Called after each unit test is executed.
int main_test(void)
Main unit testing program.
static tick_t start_test
Start time for the current unit test.
Unit test program for the Spatial_Audio_Framework.
void test__real2complexSHMtx(void)
Testing the real to complex spherical harmonic conversion, using getSHcomplex() as the reference.
void test__formulate_M_and_Cr(void)
Testing the formulate_M_and_Cr() function, and verifying that the output mixing matrices yield signal...
void test__calculateGridWeights(void)
Test grid weight approximation.
void test__sphPWD(void)
Testing the DoA estimation performance of sphPWD()
void test__saf_fft(void)
Testing the forward and backward complex-complex FFT (saf_fft)
void test__realloc2d_r(void)
Testing the realloc2d_r() function (reallocating 2-D array, while retaining the previous data order; ...
void test__evalIIRTransferFunction(void)
Testing that the magnitudes and phases returned by evalIIRTransferFunction() are numerically similar ...
void test__getSHreal_recur(void)
Testing that the getSHreal_recur() function is somewhat numerically identical to the full-fat getSHre...
void test__getVoronoiWeights(void)
Testing that the weights from the getVoronoiWeights() function sum to 4pi and that the weights are al...
void test__sphericalBesselFunctions(void)
Testing bessel_jn(), bessel_in(), bessel_yn(), and bessel_kn()
void test__truncationEQ(void)
Testing the truncation EQ.
void test__ims_shoebox_RIR(void)
Testing the ims shoebox simulator, when generating room impulse respones (RIRs) from the computed ech...
void test__getSHreal(void)
Testing the orthogonality of the getSHreal() function.
void test__saf_stft_50pc_overlap(void)
Testing for perfect reconstruction of the saf_stft (when configured for 50% window overlap)
void test__butterCoeffs(void)
Testing that the coefficients computed with butterCoeffs() are numerically similar to the "butter" fu...
void test__sortf(void)
Testing the sortf() function (sorting real floating point numbers)
void test__cmplxPairUp(void)
Testing the cmplxPairUp() function (grouping up conjugate symmetric values)
void test__smb_pitchShifter(void)
Testing that the smb_pitchShifter can shift the energy of input spectra by one octave down.
void test__arraySHTmatrices(void)
Testing the arraySHTmatrices() function.
void test__unique_i(void)
Testing that the unique_i() function operates correctly.
void test__getLoudspeakerDecoderMtx(void)
Testing to assure that (given a uniform loudspeaker layout), the SAD, MMD and EPAD decoders are all e...
void test__saf_example_array2sh(void)
Testing the SAF array2sh.h example (this may also serve as a tutorial on how to use it)
void test__saf_example_rotator(void)
Testing the SAF rotator.h example (this may also serve as a tutorial on how to use it)
void test__saf_rfft(void)
Testing the forward and backward real-(half)complex FFT (saf_rfft)
void test__getSHreal_part(void)
Testing that the getSHreal_part() function is somewhat numerically identical to the full-fat getSHrea...
void test__cylindricalBesselFunctions(void)
Testing bessel_Jn(), bessel_Yn()
void test__sphESPRIT(void)
Testing the DoA estimation performance of sphESPRIT()
void test__dvf_dvfShelfCoeffs(void)
Test the generation of high shelf coeffs based on shelf gain and fc parameters.
void test__delaunaynd(void)
Testing that the delaunaynd() function can triangulate basic shapes.
void test__malloc6d(void)
Testing that malloc6d() works, and is truely contiguously allocated.
void test__getSHrotMtxReal(void)
Testing the spherical harmonic rotation matrix function getSHrotMtxReal()
void test__sphModalCoeffs(void)
Testing the sphModalCoeffs() function.
void test__afSTFT(void)
Testing the alias-free STFT filterbank (near)-perfect reconstruction performance.
void test__saf_example_ambi_enc(void)
Testing the SAF ambi_enc.h example (this may also serve as a tutorial on how to use it)
void test__saf_example_ambi_bin(void)
Testing the SAF ambi_bin.h example (this may also serve as a tutorial on how to use it)
void test__formulate_M_and_Cr_cmplx(void)
Testing the formulate_M_and_Cr_cmplx() function, and verifying that the output mixing matrices yield ...
void test__complex2realSHMtx(void)
Testing the complex to real spherical harmonic conversion, using getSHreal() as the reference.
void test__computeSectorCoeffsEP(void)
Testing the computeSectorCoeffsEP() and computeVelCoeffsMtx() functions and comparing their output to...
void test__faf_IIRFilterbank(void)
Testing that the faf_IIRFilterbank can reconstruct the original signal power.
void test__checkCondNumberSHTReal(void)
Testing that for T-designs, the condition numbers are all equal to 1.
void test__qmf(void)
Testing the (near)-perfect reconstruction performance of the QMF filterbank.
void test__hades(void)
Test for hades.
void test__gexpm(void)
Testing computing the matrix exponential - comparing the output to that of the "expm" function in Mat...
void test__dvf_interpDVFShelfParams(void)
Test the interpolation of high shelf parameters based on distance and incidence angle parameters.
void test__sortz(void)
Testing the sortz() function (sorting complex double-floating point numbers)
void test__cart2sph(void)
Testing cart2sph() and sph2cart() are reversible.
void test__mysofa_load(void)
Testing the dependency free mysofa SOFA reader.
void test__dvf_calcDVFShelfParams(void)
Calculate high shelf parameters, g0, gInf, fc, from the lookup table coefficients (10 degree steps)
void test__tracker3d(void)
Testing that the particle-filtering based tracker is able to correctly track two simultaneous targets...
void test__saf_example_spreader(void)
Testing the SAF spreader.h example (this may also serve as a tutorial on how to use it)
void test__malloc5d(void)
Testing that malloc5d() works, and is truely contiguously allocated.
void test__getSHcomplex(void)
Testing the orthogonality of the getSHcomplex() function.
void test__malloc4d(void)
Testing that malloc4d() works, and is truely contiguously allocated.
void test__saf_matrixConv(void)
Testing the saf_matrixConv.
void test__sphMUSIC(void)
Testing the DoA estimation performance of sphMUSIC()
void test__saf_sofa_open(void)
Testing the SAF SOFA reader that uses the netcdf library.
void test__ims_shoebox_TD(void)
Testing the ims shoebox simulator, when applying the echograms in the time- domain.
void test__latticeDecorrelator(void)
Testing the performance of the latticeDecorrelator, verifying that the inter- channel cross-correlati...
void test__saf_example_ambi_dec(void)
Testing the SAF ambi_dec.h example (this may also serve as a tutorial on how to use it)
void test__saf_stft_LTI(void)
Testing for perfect reconstruction of the saf_stft (when configured for linear time-invariant (LTI) f...
void test__sofa_comparison(void)
Testing that the two SOFA readers produce the same results.
void test__resampleHRIRs(void)
Testing that resampleHRIRs() is resampling adequately.
void test__quaternion(void)
Testing that quaternion2rotationMatrix() and rotationMatrix2quaternion() are reversible.
uint64_t tick_t
Tick type.
TIMER_API deltatime_t timer_elapsed(const tick_t t)
TIMER_API tick_t timer_current(void)
TIMER_API int timer_lib_initialize(void)
TIMER_API void timer_lib_shutdown(void)