Is the assert command supported?

Mark Waddingham mark at livecode.com
Tue Oct 13 03:52:46 EDT 2015


On 2015-10-13 08:59, Peter W A Wood wrote:
> The assert command appears to be included in LiveCode 8 but is not
> mentioned in either the dictionary or the user guide. All I’ve been
> able to find about was in an article in RevUp -
> http://newsletters.livecode.com/february/issue166/newsletter1.html
> <http://newsletters.livecode.com/february/issue166/newsletter1.html>
> 
> Is it still supported? It is still experimental?

Still experimental - the main problem it was put in to solve was to be 
able to test for error's being thrown from an expression. However, as it 
turns out, its inflexibility doesn't really warrant its use and I wonder 
if the 'assert' verb should actually be repurposed away from unit tests 
and to general (simple) runtime assertions.

If you are looking to write unit-tests, then Peter recently put together 
a super-simple LiveCode Script test runner which runs unit tests in the 
engine after they are built under CI:

https://github.com/livecode/livecode/tree/develop/tests/lcs

It might be worth a look at the work he has done if you are looking to 
do a similar thing for your projects.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list