diff --git a/CMakeLists.txt b/CMakeLists.txt index deb5ce96..9771bb88 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ if(NOT REVISION) endif(NOT REVISION) set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -O0 -ggdb") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_INSTALL_PREFIX "") include(GNUInstallDirs) diff --git a/src/lib/ebus/test/test_data.cpp b/src/lib/ebus/test/test_data.cpp index 13b812dc..9ab465ee 100755 --- a/src/lib/ebus/test/test_data.cpp +++ b/src/lib/ebus/test/test_data.cpp @@ -415,6 +415,7 @@ int main() { {"x,,exp", "-32.767", "10feffff04681103c2", "00", ""}, {"x,,exp,1000", "-0.000090000", "10feffff04ec51b8bd", "00", ""}, {"x,,exp,-100", "-9", "10feffff04ec51b8bd", "00", ""}, + {"x,,exp", "0.25", "10feffff040000803e", "00", ""}, {"x,,exp", "-", "10feffff040000c07f", "00", "W"}, {"x,,exr", "-0.09", "10feffff04bdb851ec", "00", ""}, {"x,,exr", "0.0", "10feffff0400000000", "00", ""}, @@ -528,7 +529,7 @@ int main() { templates->readLineFromStream(&dummystr, __FILE__, false, &lineNo, &row, &errorDescription, false, nullptr, nullptr); const DataField* fields = nullptr; for (unsigned int i = 0; i < sizeof(checks) / sizeof(checks[0]); i++) { - string check[5] = checks[i]; + string* check = checks[i]; istringstream isstr(check[0]); string expectStr = check[1]; MasterSymbolString mstr; diff --git a/src/lib/ebus/test/test_filereader.cpp b/src/lib/ebus/test/test_filereader.cpp index 95c53d21..dabb69d2 100755 --- a/src/lib/ebus/test/test_filereader.cpp +++ b/src/lib/ebus/test/test_filereader.cpp @@ -110,7 +110,7 @@ class TestReader : public MappedFileReader { return RESULT_ERR_INVALID_ARG; } cout << "read line " << static_cast(baseLine + lineNo) << ": split OK" << endl; - string resultline[3] = resultlines[lineNo - 1]; + string* resultline = resultlines[lineNo - 1]; if (row->empty()) { cout << " result empty"; if (resultline[0] == "") { @@ -123,7 +123,7 @@ class TestReader : public MappedFileReader { } bool error = false; - string colnames[3] = resultlines[0]; + string* colnames = resultlines[0]; map& defaults = getDefaults()[""]; for (size_t colIdx = 0; colIdx < 3; colIdx++) { string col = colnames[colIdx]; @@ -145,7 +145,7 @@ class TestReader : public MappedFileReader { } for (size_t subIdx = 0; subIdx < subRows->size(); subIdx++) { - string resultsubline[4] = resultsublines[lineNo - 1][subIdx]; + string* resultsubline = resultsublines[lineNo - 1][subIdx]; *row = (*subRows)[subIdx]; if (row->empty()) { cout << " sub " << subIdx << " result empty"; diff --git a/src/lib/ebus/test/test_message.cpp b/src/lib/ebus/test/test_message.cpp index aea4f361..f62d774c 100644 --- a/src/lib/ebus/test/test_message.cpp +++ b/src/lib/ebus/test/test_message.cpp @@ -217,7 +217,7 @@ int main() { mstrs.resize(1); sstrs.resize(1); for (unsigned int i = 0; i < sizeof(checks) / sizeof(checks[0]); i++) { - string check[5] = checks[i]; + string* check = checks[i]; string inputStr = check[1]; string flags = check[4]; bool isTemplate = flags == "template";