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

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/timestretchfix/ffmpeg5
Last change on this file since 0056314 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
Line 
1#include <stdlib.h>
2#include "aubio.h"
3
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.
6
7int main (void)
8{
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;
24}
Note: See TracBrowser for help on using the repository browser.