Changeset 695e171 for tests/src/test-delnull.c
- Timestamp:
- Sep 6, 2015, 10:40:14 AM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler
- Children:
- 3d30b90
- Parents:
- 65c352e (diff), 827267b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/test-delnull.c
r65c352e r695e171 2 2 #include "aubio.h" 3 3 4 // Because aubio does not check for double free, this program will crash.5 // Programs that call these functions should check for null pointers.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 6 7 7 int main (void) 8 8 { 9 del_fvec(NULL); 10 del_lvec(NULL); 11 del_cvec(NULL); 12 return 0; 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; 13 24 }
Note: See TracChangeset
for help on using the changeset viewer.