[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] assert doesn't work in ns?



> for ns snapshots later than 24 March 2000 and simulation debugging,
> I'd be tempted to do something like:
> 
> if (debug_ && (!expression))
>     printf ('something a bit more test-specific');

Or 

  if (!expression)
	debug("abcde %d\n", expression);

then if you '$obj set debug_ 1' it'll print out stuff otherwise nothing.

or 

  if (!expression)
	abort("abcde %d\n", expression);

- Haobo