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

Make custom printf independent from pending runtime errors #452

Open Garados007 opened 1 year ago

Garados007 commented 1 year ago

We already use a small trick which performs tasks that can have new runtime errors for GetWavePointer:

https://github.com/byte-physics/igortest/blob/080690c56fb594da40f900883f45bbf7836203a6/procedures/igortest-utils.ipf#L356-L357

Using this for printf, we can allow pending runtime errors from the test case and create new messages at the same time. To prevent the double execution, we can check in the called function if it was called a second time and just return.