Re: [PATCH V2 1/3] strbuf: add tests
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 7, 2016, 08:44 UTC
- Message-ID
- <alpine.DEB.2.20.1606071042290.28610@virtualbox>
- In-Reply-To
- <20160606151340.22424-2-william.duclot@ensimag.grenoble-inp.fr>
Hi William,
On Mon, 6 Jun 2016, William Duclot wrote:
Show 17 quoted lines
> + enum {
> + MODE_UNSPECIFIED = 0,
> + MODE_BASIC_GROW ,
> + MODE_STRBUF_CHECK,
> + MODE_GROW_OVERFLOW
> + } cmdmode = MODE_UNSPECIFIED;
> + struct option options[] = {
> + OPT_CMDMODE(0, "basic_grow", &cmdmode,
> + N_(" basic grow test"),
> + MODE_BASIC_GROW),
> + OPT_CMDMODE(0, "strbuf_check_behavior", &cmdmode,
> + N_("check the strbuf's behavior"),
> + MODE_STRBUF_CHECK),
> + OPT_CMDMODE(0, "grow_overflow", &cmdmode,
> + N_("test grow expecting overflow"),
> + MODE_GROW_OVERFLOW),
> + OPT_END()I found it to be really helpful to keep as much consistency as possible (Git's source code is complicated enough, no need to make it even more complicated).
In this particular instance, I would suggest to rename either MODE_STRBUF_CHECK or strbuf_check_behavior to match the other one.
Ciao, Johannes