Mercurial > hg > orthanc
comparison UnitTestsSources/LoggingTests.cpp @ 3471:1fdbe5885783
fix unit tests: removed \r from the expected string since we removed it when generating the log line
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 11 Jul 2019 13:29:50 +0200 |
parents | 815b81142ff7 |
children | 94f4a18a79cc |
comparison
equal
deleted
inserted
replaced
3470:9aaf40d504a2 | 3471:1fdbe5885783 |
---|---|
59 } | 59 } |
60 | 60 |
61 /** | 61 /** |
62 Extracts the log line payload | 62 Extracts the log line payload |
63 | 63 |
64 "E0423 16:55:43.001194 LoggingTests.cpp:102] Foo bar?\r\n" | 64 "E0423 16:55:43.001194 LoggingTests.cpp:102] Foo bar?\n" |
65 --> | 65 --> |
66 "Foo bar" | 66 "Foo bar" |
67 | 67 |
68 If the log line cannot be matched, the function returns false. | 68 If the log line cannot be matched, the function returns false. |
69 */ | 69 */ |
70 | 70 |
71 #ifdef WIN32 | 71 #define EOLSTRING "\n" |
72 # define EOLSTRING "\r\n" | |
73 #else | |
74 # define EOLSTRING "\n" | |
75 #endif | |
76 | 72 |
77 static bool GetLogLinePayload(std::string& payload, | 73 static bool GetLogLinePayload(std::string& payload, |
78 const std::string& logLine) | 74 const std::string& logLine) |
79 { | 75 { |
80 const char* regexStr = "[A-Z][0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6} " | 76 const char* regexStr = "[A-Z][0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6} " |