@@ -50,25 +50,6 @@ void check(std::string sTestName, bool bGotValue, bool bExpectedValue) {
5050 Log::ok (sTestName , " fine" );
5151};
5252
53- void testLine (
54- int nNumberOfTest,
55- std::string sLine ,
56- std::string sPrefix ,
57- bool isArrayItem,
58- std::string sName ,
59- std::string sValue ,
60- std::string sComment
61- ) {
62- std::string TAG = " LINE" + std::to_string (nNumberOfTest);
63- WSJCppYAMLParsebleLine line (nNumberOfTest);
64- Log::info (TAG, " Test line" + std::to_string (nNumberOfTest) + " : '" + sLine + " '" );
65- line.parseLine (sLine );
66- check (TAG + " -prefix" , line.getPrefix (), sPrefix );
67- check (TAG + " -arrayitem" , line.isArrayItem (), isArrayItem);
68- check (TAG + " -name" , line.getName (), sName );
69- check (TAG + " -value" , line.getValue (), sValue );
70- check (TAG + " -comment" , line.getComment (), sComment );
71- };
7253
7354int main (int argc, char * argv[]) {
7455 std::string TAG = " MAIN" ;
@@ -80,13 +61,6 @@ int main(int argc, char* argv[]) {
8061 Fallen::makeDir (appLogPath);
8162 }
8263
83- // tests for line parser
84- testLine (1 , " # Some comment 1 " , " " , false , " " , " " , " Some comment 1 " );
85- testLine (2 , " test2: \" t\\\" wo\" # some comment 2" , " " , false , " test2" , " t\" wo" , " some comment 2" );
86- testLine (3 , " test3:" , " " , false , " test3" , " " , " " );
87- testLine (4 , " - test4" , " " , true , " " , " test4" , " " );
88- testLine (5 , " " , " " , false , " " , " " , " " );
89-
9064 // tests
9165
9266
0 commit comments