RELEASE LiveCode 6.6 DP1

Trevor DeVore lists at mangomultimedia.com
Sun Feb 16 05:14:16 CET 2014


On Sat, Feb 15, 2014 at 5:24 PM, Björnke von Gierke <bvg at mac.com> wrote:

> Can someone elaborate why assert is better then using "is true/false", and
> what additional things it adds?
>

'assert' is designed for writing tests for your code. That being the case,
if 'assert' fails then the assertError message is sent which allows you to
log the error. If you are releasing an update to some code, you run your
tests and check your log to see if you broke anything.

If you are writing tests with complete coverage for a code library you may
end up with hundreds or thousands of 'assert' handlers that test that your
code behaves as it is supposed to. I think the 'assert' syntax is much more
compact and easier to write/read then a number of if/then statements that
then make a call to a logging function.

-- 
Trevor DeVore
Blue Mango Learning Systems
www.screensteps.com    -    www.clarify-it.com


More information about the use-livecode mailing list