public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
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&gt;Hehe, bells and whistles ... :-) &gt; &gt;I'd prefer to have the escape sequences &gt;be "self-documented" so that the &gt;intent is clear enough.  For instance: &gt; &gt;#define BRIGHT_YELLOW_COLOR &gt;"\a1;33m" &gt;#define DEFAULT_TERMINAL_COLOR &gt;"\033[0m" &gt; &gt;and then you'd you'd emit colored &gt;messages like: &gt; &gt;cout << BRIGHT_YELLOW_COLOR &gt;     << "Test Passed:" &gt;     << DEFAULT_TERMINAL_COLOR &gt;     << cmd &gt;    << std::endl; &gt; &gt;I believe that is more self explanatory for &gt;someone who reads the code. &gt; &gt;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.
&nbsp;
I put it in test-utils.h, because I also found this kind of problem in other test cases.&nbsp;
I will modify other use cases in the next time
--&nbsp;
Regards,
tangmeng
------------------&nbsp;Original&nbsp;------------------
From: &nbsp;"Dodji Seketeli"<dodji@seketeli.org&gt;;
Date: &nbsp;Tue, Nov 9, 2021 07:30 PM
To: &nbsp;"tangmeng"<tangmeng@uniontech.com&gt;; 
Cc: &nbsp;"libabigail"<libabigail@sourceware.org&gt;; 
Subject: &nbsp;Re: [PATCH v2] make abicompat test happy

&nbsp;

Hello,

tangmeng <tangmeng@uniontech.com&gt; a écrit:

[...]

&gt; +
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (is_ok)
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.&nbsp; 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
&nbsp;&nbsp;&nbsp;&nbsp; << "Test Passed:"
&nbsp;&nbsp;&nbsp;&nbsp; << DEFAULT_TERMINAL_COLOR
&nbsp;&nbsp;&nbsp;&nbsp; << cmd
&nbsp;&nbsp;&nbsp;&nbsp; << 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

      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).