From: 汤孟 <tangmeng@uniontech.com>
To: "Dodji Seketeli" <dodji@seketeli.org>
Cc: libabigail <libabigail@sourceware.org>
Subject: Re: [PATCH v2] make abicompat test happy
Date: Tue, 9 Nov 2021 20:38:29 +0800 [thread overview]
Message-ID: <tencent_150D195C5F4B52C562A5C38C@qq.com> (raw)
In-Reply-To: <871r3p8t2f.fsf@seketeli.org>
Hello, Dodji>Hehe, bells and whistles ... :-) > >I'd prefer to have the escape sequences >be "self-documented" so that the >intent is clear enough. For instance: > >#define BRIGHT_YELLOW_COLOR >"\a1;33m" >#define DEFAULT_TERMINAL_COLOR >"\033[0m" > >and then you'd you'd emit colored >messages like: > >cout << BRIGHT_YELLOW_COLOR > << "Test Passed:" > << DEFAULT_TERMINAL_COLOR > << cmd > << std::endl; > >I believe that is more self explanatory for >someone who reads the code. > >Could you please use that kind of style ?
Thank you for your suggestions, I have reflected your suggestions in the v3 version of the patch.
I put it in test-utils.h, because I also found this kind of problem in other test cases.
I will modify other use cases in the next time
--
Regards,
tangmeng
------------------ Original ------------------
From: "Dodji Seketeli"<dodji@seketeli.org>;
Date: Tue, Nov 9, 2021 07:30 PM
To: "tangmeng"<tangmeng@uniontech.com>;
Cc: "libabigail"<libabigail@sourceware.org>;
Subject: Re: [PATCH v2] make abicompat test happy
Hello,
tangmeng <tangmeng@uniontech.com> a écrit:
[...]
> +
> + if (is_ok)
> + {
> + cout << "\e[1;33mTest PASSED: \033[0m" << cmd << "\n";
Hehe, bells and whistles ... :-)
I'd prefer to have the escape sequences be "self-documented" so that the
intent is clear enough. For instance:
#define BRIGHT_YELLOW_COLOR "\a1;33m"
#define DEFAULT_TERMINAL_COLOR "\033[0m"
and then you'd you'd emit colored messages like:
cout << BRIGHT_YELLOW_COLOR
<< "Test Passed:"
<< DEFAULT_TERMINAL_COLOR
<< cmd
<< std::endl;
I believe that is more self explanatory for someone who reads the code.
Could you please use that kind of style ?
Thanks a lot for your work, by the way, it's highly appreciated!
Cheers,
--
Dodji
prev parent reply other threads:[~2021-11-09 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 2:00 tangmeng
2021-11-09 11:30 ` Dodji Seketeli
2021-11-09 12:38 ` 汤孟 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_150D195C5F4B52C562A5C38C@qq.com \
--to=tangmeng@uniontech.com \
--cc=dodji@seketeli.org \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).