Thanks Mark

> On 13 Oct 2015, at 15:52, Mark Waddingham <m...@livecode.com> wrote:
> 
> 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.

I was mis-using it for general (simple) runtime assertions when I wish to call 
a function and don’t use the returned value. I think it would be a good 
addition to the language.

> 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 
> <https://github.com/livecode/livecode/tree/develop/tests/lcs>

I have my own even simpler test framework, based on others I have used with 
other languages. It is very flexible and sufficient for my needs. It can be 
used to test both GUI stacks and Server stacks - 
https://github.com/PeterWAWood/LiveCode-MiniTest 
<https://github.com/PeterWAWood/LiveCode-MiniTest> 

Kind regards

Peter
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to