ptest
ptest copied to clipboard
ptest output does not fallback on the correct ANSI color
Hello!
I was just building your other MPC project for fun and profit using Jenkins and the ptest output unexpectedly mixes colors at some point. I didn't investigate further but I would say it's just because you assume a different default color at some point. Screenshot attached. This is a very minor issue, but simple to fix so why not.
That being said, I discovered ptest at the same time and it seems great. I'll try to give a shot for my next C project.
Hi,
Thanks for the report and glad you like the project! You're correct I was assuming a default color of white. This should be fixed in 798aa244f6445faae0618a03a72c831ab85c2763, perhaps you can verify.
Dan
Hi Daniel,
yes, the color part looks good now, thanks for the quick fix!
One last thing, I don't remember having those last time, but you got a few lingering warnings (on gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)):
tests/ptest.c:47:20: warning: comma at end of enumerator list [-Wpedantic]
DEFAULT = 16,
^
tests/ptest.c: In function 'pt_assert_run':
tests/ptest.c:110:45: warning: unused parameter 'func' [-Wunused-parameter]
int result, const char* expr, const char* func, const char* file, int line) {
^
tests/ptest.c: In function 'ptest_signal':
tests/ptest.c:132:3: warning: switch missing default case [-Wswitch-default]
switch( sig ) {
^
tests/ptest.c: In function 'pt_run':
tests/ptest.c:263:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i = 0; i < num_tests; i++) {
Best regards, fc.