Mercurial > octave-nkf
comparison libinterp/dldfcn/fftw.cc @ 19164:90421e725f1d
codesprint: Tests for fftw
* fftw.cc: Add tests and input validation for fftw.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 21 Sep 2014 14:38:29 -0400 |
parents | 6113e0c6920b |
children | f5ad7470d957 |
comparison
equal
deleted
inserted
replaced
19163:ba1fbfa5cece | 19164:90421e725f1d |
---|---|
365 %! assert (fftw ("planner"), method); | 365 %! assert (fftw ("planner"), method); |
366 %! unwind_protect_cleanup | 366 %! unwind_protect_cleanup |
367 %! fftw ("planner", def_method); | 367 %! fftw ("planner", def_method); |
368 %! end_unwind_protect | 368 %! end_unwind_protect |
369 | 369 |
370 %!error <Invalid call to fftw> fftw (); | 370 %!testif HAVE_FFTW |
371 %!error <Invalid call to fftw> fftw ("planner", "estimate", "measure"); | 371 %! def_dwisdom = fftw ("dwisdom"); |
372 %! def_swisdom = fftw ("swisdom"); | |
373 %! unwind_protect | |
374 %! wisdom = fftw ("dwisdom"); | |
375 %! assert (ischar (wisdom)); | |
376 %! fftw ("dwisdom", wisdom); | |
377 %! assert (fftw ("dwisdom"), wisdom); | |
378 %! wisdom = fftw ("swisdom"); | |
379 %! assert (ischar (wisdom)); | |
380 %! fftw ("swisdom", wisdom); | |
381 %! assert (fftw ("swisdom"), wisdom); | |
382 %! unwind_protect_cleanup | |
383 %! fftw ("dwisdom", def_dwisdom); | |
384 %! fftw ("swisdom", def_swisdom); | |
385 %! end_unwind_protect | |
372 | 386 |
373 %!testif HAVE_FFTW3_THREADS | 387 %!testif HAVE_FFTW3_THREADS |
374 %! n = fftw ("threads"); | 388 %! n = fftw ("threads"); |
375 %! unwind_protect | 389 %! unwind_protect |
376 %! fftw ("threads", 3); | 390 %! fftw ("threads", 3); |
377 %! assert (fftw ("threads"), 3); | 391 %! assert (fftw ("threads"), 3); |
378 %! unwind_protect_cleanup | 392 %! unwind_protect_cleanup |
379 %! fftw ("threads", n); | 393 %! fftw ("threads", n); |
380 %! end_unwind_protect | 394 %! end_unwind_protect |
395 | |
396 %!error <Invalid call to fftw> fftw (); | |
397 %!error <Invalid call to fftw> fftw ("planner", "estimate", "measure"); | |
398 %!error fftw (3); | |
399 %!error fftw ("invalid"); | |
400 %!error fftw ("planner", "invalid"); | |
401 %!error fftw ("planner", 2); | |
402 %!error fftw ("dwisdom", "invalid"); | |
403 %!error fftw ("swisdom", "invalid"); | |
404 %!error fftw ("threads", "invalid"); | |
405 %!error fftw ("threads", -3); | |
381 */ | 406 */ |