source: tests/src/test-delnull.c @ cd8dc52

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampleryinfft+
Last change on this file since cd8dc52 was abffec0, checked in by Paul Brossier <piem@piem.org>, 9 years ago

tests/src/test-delnull.c: improve test, avoid segfaults

  • Property mode set to 100644
File size: 580 bytes
RevLine 
[7e35b37]1#include <stdlib.h>
[332487b]2#include "aubio.h"
[7e35b37]3
[abffec0]4// When creating an aubio object, the user should check whether the object is
5// set NULL, indicating the creation failed and the object was not allocated.
[c0916f2]6
[158e031]7int main (void)
[7e35b37]8{
[abffec0]9  uint_t return_code = 0;
10  fvec_t *f = new_fvec(-12);
11  cvec_t *c = new_cvec(-12);
12  lvec_t *l = new_lvec(-12);
13  aubio_fft_t *fft = new_aubio_fft(-12);
14  if (f != NULL) {
15    return_code = 1;
16  } else if (c != NULL) {
17    return_code = 2;
18  } else if (l != NULL) {
19    return_code = 3;
20  } else if (fft != NULL) {
21    return_code = 3;
22  }
23  return return_code;
[7e35b37]24}
Note: See TracBrowser for help on using the repository browser.