[bind10-dev] EXPECT_TRUE() considered harmful?

Jelte Jansen jelte at isc.org
Mon Feb 20 23:33:43 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/20/2012 04:54 PM, Shane Kerr wrote:
> 
> This is true. I checked through the code, and there are a bunch of 
> cases where we use EXPECT_TRUE() rather than EXPECT_<op>().
> 
> I propose that we add this recommendation to the coding
> guidelines:
> 
> http://bind10.isc.org/wiki/CodingGuidelines
> 
> I'll leave the ticket there because we'll need a cleanup task, but
> I thought we should have a discussion on the developer list. :)
> 
> Any objections or other ideas?
> 

No objection from me,

A few of these cases are caught by cppcheck now (of the type
EXPECT_TRUE(A >= A), and will be fixed in #1193 (just did those)

The rest seems like a fine task to do if one is bored for half an hour :)

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9C2FcACgkQ4nZCKsdOncUQ1ACfaf+USNcI3lqbMN2EVNyypQGx
ibwAn2STpEsqUD4zMQRmPg2D5VLeBa0D
=3IcM
-----END PGP SIGNATURE-----


More information about the bind10-dev mailing list