From 3a13fe13c46357d518f7c71451f714f02c00039d Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 29 Nov 2024 14:29:01 -0500 Subject: [PATCH] main.cpp,cfg/main.cfg : MOve cwTest cfg. to cfg/test/main.cfg. Move numbCvt test to cwTest. Update 'midiDevice' test in main.cfg. --- src/cwtest/cfg/main.cfg | 74 ++++++----------------------------------- src/cwtest/main.cpp | 19 ----------- 2 files changed, 10 insertions(+), 83 deletions(-) diff --git a/src/cwtest/cfg/main.cfg b/src/cwtest/cfg/main.cfg index b023ce6..37fac53 100644 --- a/src/cwtest/cfg/main.cfg +++ b/src/cwtest/cfg/main.cfg @@ -14,70 +14,9 @@ test: { - test: { - base_dir: "~/src/cwtest/src/cwtest/cfg/test", - - resource_dir:"rsrc", - output_dir:"cur", - ref_dir:"ref", - - - // Notes: - // 1. The test spec. is recursive. Modules can be listed - // inside of modules. (e.g. 'lex' and 'flow'). - // 2. If a module spec. does not have an embedded - // 'module' or 'module_args' then the cases may - // be listed without a 'cases' label. - // (e.g. 'filesys','object', 'vop') - // 3. Command line args: - // | 'all' (required) The module path always begins with a '/'. - // | 'all' (required) - // 'gen_report' Print modulue/test label. - // 'compare' Run compare pass. - // 'echo' Print the generated test output to the console. - // 'args' All command line args after 'args' are passed to the tests. - // 4. Example command lines: - // r ~/src/cwtest/src/cwtest/cfg/main.cfg test /lex test_0 compare - // r ~/src/cwtest/src/cwtest/cfg/main.cfg test /flow test_0 compare - test: { - module_args: {} - - modules: { - lex:{ module_args:{}, cases: { test_0:{} } }, - filesys:{ test_0:{}}, - object:{ basic:{}, to_json:{} }, - vop:{ test_0:{} }, - time:{ test_0:{} }, - textBuf: { test_0:{} }, - audioBuf:{ test_0:{} } - mtx:{ test_0: { - m0: [ [0,3], [1,4], [2,5] ], - m1: [ [0,1,2],[3,4,5] ], - - m2: [ [[0,1],[2,3]], [[4,5],[6,7]], [[8,9],[10,11]] ], - m3: [ 0,1,2 ], - - m4: [ [10,13], [11,14], [12,15] ], - - y0: [ [5,14],[14,50] ], - y1: [ [9,12,15],[12,17,22],[15,22,29] ], - } }, - - flow:"flow_test.cfg", - wt_bank: { test_0: { - wtb_cfg_fname:"/home/kevin/temp/wt1/bank", - }} - audio_transform: { wnd_func:{}, ola:{}, shift_buf:{}, wt_osc:{}, wt_seq_osc:{}, multi_ch_wt_seq_osc:{} }, - wt_note: { test_0:{} }, - thread_tasks: { test_0:{} }, - } - }}, - - variadicTpl: {}, - numbCvt: {}, thread: {}, kbTest1: {}, kbTest2: {}, @@ -101,15 +40,22 @@ serialSrv: {}, midiDeviceReport: {}, - + + // Test the MIDI file input device. See cwMidiDeviceTest.cpp + // Compares the time between MIDI events in a file to the time between + // the same events from the file device. midiDevice: { appNameStr: "test_app", fileDevName: "file_dev", fileDevReadAheadMicros: 3000, parseBufByteCnt: 1024, - testFileLabel: "file_0", + enableBufFl:true, + bufferMsgCnt:4096, + filterRtSenseFl:true + + testFileLabel: "file_0", // testFileEnableFl: true, - + file_ports: [ { "label":"file_0", diff --git a/src/cwtest/main.cpp b/src/cwtest/main.cpp index a66eef3..315f129 100644 --- a/src/cwtest/main.cpp +++ b/src/cwtest/main.cpp @@ -298,24 +298,6 @@ cw::rc_t variadicTplTest( const cw::object_t* cfg, const cw::object_t* args, int return cw::kOkRC; } -cw::rc_t numbCvtTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) -{ - int8_t x0 = 3; - int x1 = 127; - - cw::numeric_convert( x1, x0 ); - cwLogPrint("%i %i\n",x0,x1); - - - int v0 = -1; - double v1 = -1; - cw::string_to_number("123",v0); - cw::string_to_number("3.4",v1); - cwLogPrint("%i %f\n",v0,v1 ); - - return cw::kOkRC; -} - cw::rc_t testTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::test::test(args,argc,argv); } cw::rc_t threadTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::threadTest(); } @@ -674,7 +656,6 @@ int main( int argc, const char* argv[] ) { { "variadicTpl", variadicTplTest }, { "test", testTest }, - { "numbCvt", numbCvtTest }, { "thread", threadTest }, { "kbTest1", kbTest1Test }, { "kbTest2", kbTest2Test },