Changeset abe67e1
- Timestamp:
- Nov 28, 2018, 10:41:10 PM (6 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
- Children:
- a6065b9
- Parents:
- c0ce78f
- Location:
- tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/synth/test-wavetable.c
rc0ce78f rabe67e1 7 7 8 8 if (argc < 2) { 9 err = 2;10 PRINT_ERR("not enough arguments\n");9 PRINT_ERR("not enough arguments, running tests\n"); 10 err = run_on_default_sink(main); 11 11 PRINT_MSG("usage: %s <output_path> [freq] [samplerate]\n", argv[0]); 12 12 return err; -
tests/utils_tests.h
rc0ce78f rabe67e1 5 5 #include <assert.h> 6 6 #include "config.h" 7 8 #ifdef HAVE_LIMITS_H 9 #include <limits.h> // PATH_MAX 10 #endif /* HAVE_LIMITS_H */ 11 #ifndef PATH_MAX 12 #define PATH_MAX 1024 13 #endif 7 14 8 15 #ifdef HAVE_C99_VARARGS_MACROS … … 52 59 srandom (seed); 53 60 } 61 62 int run_on_default_sink( int main(int, char**) ) 63 { 64 int argc = 2, err; 65 char* argv[argc]; 66 char sink_path[PATH_MAX] = "tmp_aubio_XXXXXX"; 67 int fd = mkstemp(sink_path); 68 argv[0] = __FILE__; 69 if (!fd) return 1; 70 argv[1] = sink_path; 71 err = main(argc, argv); 72 unlink(sink_path); 73 close(fd); 74 return err; 75 }
Note: See TracChangeset
for help on using the changeset viewer.