Changes in tests/src/io/test-source.c [6200052:5c849af]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/io/test-source.c
r6200052 r5c849af 90 90 if (read != hop_size) return 1; 91 91 92 // read again in undersized vector93 del_fvec(vec);94 vec = new_fvec(hop_size - 1);95 aubio_source_do(s, vec, &read);96 if (read != hop_size - 1) return 1;97 98 // read again in oversized vector99 del_fvec(vec);100 vec = new_fvec(hop_size + 1);101 aubio_source_do(s, vec, &read);102 if (read != hop_size) return 1;103 104 92 // seek to 0 105 93 if(aubio_source_seek(s, 0)) return 1; 106 94 107 95 // read again as multiple channels 108 aubio_source_do_multi(s, mat, &read);109 if (read != hop_size) return 1;110 111 // read again as multiple channels in an undersized matrix112 del_fmat(mat);113 mat = new_fmat(channels - 1, hop_size);114 aubio_source_do_multi(s, mat, &read);115 if (read != hop_size) return 1;116 117 // read again as multiple channels in an undersized matrix118 del_fmat(mat);119 mat = new_fmat(channels, hop_size - 1);120 aubio_source_do_multi(s, mat, &read);121 if (read != hop_size - 1) return 1;122 123 // read again as multiple channels in an oversized matrix124 del_fmat(mat);125 mat = new_fmat(channels + 1, hop_size);126 aubio_source_do_multi(s, mat, &read);127 if (read != hop_size) return 1;128 129 // read again as multiple channels in an oversized matrix130 del_fmat(mat);131 mat = new_fmat(channels, hop_size + 1);132 96 aubio_source_do_multi(s, mat, &read); 133 97 if (read != hop_size) return 1; … … 138 102 aubio_source_close(s); 139 103 140 // reading after close fails141 del_fvec(vec);142 vec = new_fvec(hop_size);143 aubio_source_do(s, vec, &read);144 del_fmat(mat);145 mat = new_fmat(channels, hop_size);146 aubio_source_do_multi(s, mat, &read);147 148 104 del_aubio_source(s); 149 105 del_fmat(mat); 150 106 del_fvec(vec); 151 107 152 // shouldn't crash on null153 del_aubio_source(NULL);154 155 108 return run_on_default_source(main); 156 109 }
Note: See TracChangeset
for help on using the changeset viewer.