byte-physics / igortest

Igor Pro Universal Testing Framework
https://docs.byte-physics.de/igor-unit-testing-framework/
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Add *_RTE, *_ANY_RTE and *_NO_RTE assertions #418

Closed Garados007 closed 1 year ago

Garados007 commented 1 year ago

These assertions check the current RTE state and create an error if its unexpected. This simplifies the user code to check for RTEs during runtime.

Close #339

Garados007 commented 1 year ago

@t-b @MichaelHuth Ready for review.

t-b commented 1 year ago

Very nice addition!

The assertions work as expected. I do have some questions about the example though ;)

    INFO("checks if CustomUserFunction returns with no RTE")
    CustomUserFunction()
    CHECK_NO_RTE()

or?

Garados007 commented 1 year ago

Whitespace in separate commit would be nice.

👍

But why remove AbortOnRTE?

I forgot to put it back after experimenting.

And I'm wondering why we still need to have the try/catch?

At this part I want to show that the user can now handle RTE and aborts differently. Previously, the user has to add AbortOnRTE and handle both in the catch-block.

Garados007 commented 1 year ago

Fixed it.