main.cpp,cfg/main.cfg : MOve cwTest cfg. to cfg/test/main.cfg. Move numbCvt test to cwTest. Update 'midiDevice' test in main.cfg.

This commit is contained in:
kevin 2024-11-29 14:29:01 -05:00
parent 632d251faa
commit 3a13fe13c4
2 changed files with 10 additions and 83 deletions

View File

@ -14,70 +14,9 @@
test: { 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:
// <module_path> | 'all' (required) The module path always begins with a '/'.
// <test_label> | '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: {}, variadicTpl: {},
numbCvt: {},
thread: {}, thread: {},
kbTest1: {}, kbTest1: {},
kbTest2: {}, kbTest2: {},
@ -101,15 +40,22 @@
serialSrv: {}, serialSrv: {},
midiDeviceReport: {}, 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: { midiDevice: {
appNameStr: "test_app", appNameStr: "test_app",
fileDevName: "file_dev", fileDevName: "file_dev",
fileDevReadAheadMicros: 3000, fileDevReadAheadMicros: 3000,
parseBufByteCnt: 1024, parseBufByteCnt: 1024,
testFileLabel: "file_0", enableBufFl:true,
bufferMsgCnt:4096,
filterRtSenseFl:true
testFileLabel: "file_0", //
testFileEnableFl: true, testFileEnableFl: true,
file_ports: [ file_ports: [
{ "label":"file_0", { "label":"file_0",

View File

@ -298,24 +298,6 @@ cw::rc_t variadicTplTest( const cw::object_t* cfg, const cw::object_t* args, int
return cw::kOkRC; 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 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(); } 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 }, { "variadicTpl", variadicTplTest },
{ "test", testTest }, { "test", testTest },
{ "numbCvt", numbCvtTest },
{ "thread", threadTest }, { "thread", threadTest },
{ "kbTest1", kbTest1Test }, { "kbTest1", kbTest1Test },
{ "kbTest2", kbTest2Test }, { "kbTest2", kbTest2Test },