Re: assert in EUPHORIA

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

Although this will perform the testing correctly, it misses out on a couple of the useful aspects of the 'assert' concept.

  1. It always executes the test. The assert is intended to only execute the test during the development phase of the application.

That is what I was going to say about your assert.e; although it may not actually test whether x is 0 when "switched off", it will still calculate x, which may be expensive.

Regards, Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu