Re: [sqlite] ALWAYS/NEVER and assert()

2013-06-12 Thread Richard Hipp
On Wed, Jun 12, 2013 at 1:26 PM, Eric Rubin-Smith  wrote:

> I note that there are some assert() statements spread through the SQLite
> code base and not isolated just to the ALWAYS and NEVER macros.  Why did
> the authors choose to write, for example,
>
>   assert( pName==0 );
>
> in sqlite3CreateIndex, rather than
>
>   ALWAYS( pName==0 );
>
> ?
>

They do different things - similar things but different all the same.

Why would you want to use ALWAYS() in place of assert()?  What would that
accomplish?



>
> For the purposes of testing coverage, do the developers compile SQLite with
> NDEBUG?
>

Of course.  Otherwise every assert() statement would raise alarms about
untested branches.


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] ALWAYS/NEVER and assert()

2013-06-12 Thread Eric Rubin-Smith
I note that there are some assert() statements spread through the SQLite
code base and not isolated just to the ALWAYS and NEVER macros.  Why did
the authors choose to write, for example,

  assert( pName==0 );

in sqlite3CreateIndex, rather than

  ALWAYS( pName==0 );

?

For the purposes of testing coverage, do the developers compile SQLite with
NDEBUG?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users