During the test, after large blocks I check whether the STOP button was pressed. There is a section with if
if (m_stopTest) { manualStopTest(); // Выключаем все //... return; // Выходим из теста }
Is it possible to somehow properly formulate this section, for example, in a function in order to change what is invested in one place? For example, such thoughts
if (checkStop(m_stopTest)) return;
Where checkStop
includes all those checks and calls. But then it is not logical that checkStop
checks, and something else there turns it on, off.