-
-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move color parse error message out of hex parser #1937
Conversation
✅ Deploy Preview for conkyweb canceled.
|
5bf3551
to
171b961
Compare
The test seems to be failing because it now catches an error in |
Simplifies parsing code, gives a better message and reduces responsibility of last parser to report errors. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Make ctest print output on failure. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
171b961
to
fd0ed44
Compare
✅ Deploy Preview for conkyweb canceled.
|
fd0ed44
to
f83c707
Compare
Didn't intend to use CRIT_ERR, however, tests shouldn't crash because CRIT_ERR calls clean_up from conky.cc. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@@ -196,6 +196,7 @@ TEST_CASE("cpu_percentage and cpu_barval return correct values") { | |||
REQUIRE(cpu_barval(&obj1) == Approx(0.507)); | |||
|
|||
delete[] info.cpu_usage; | |||
info.cpu_usage = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This little thing is out of scope, but it causes any tests which attempt using CRIT_ERR
to crash. Tests shouldn't use CRIT_ERR
because it interrupts their execution, but it's better to handle it explicitly than as a side effect of another test.
Gives a better error message if no parsers (possibly more in future) can parse the color.
This avoids issues like getting a misleading error message when color name parsing didn't work.
I'm making this change until I'm done with logging improvements (a few tweaks left, but not sure when I'll be able to clean up the code).