bool CtrlWork::update() { CvMat *limg = NULL, *rimg = NULL; try { if ( m_lrpipe->read(&limg) && m_rrpipe->read(&rimg) ) { if ( testFlow() ) { if ( (mode() == Continuous && !m_lwpipe.isFull() && !m_rwpipe.isFull()) || mode() != Continuous ) { m_lwpipe.write(limg); m_rwpipe.write(rimg); } else { CvMatSinkPol::sink(limg); CvMatSinkPol::sink(rimg); } } else { CvMatSinkPol::sink(limg); CvMatSinkPol::sink(rimg); } return true; } else { m_lwpipe.finish(); m_rwpipe.finish(); return false; } } catch (const std::exception &ex) { m_lwpipe.finish(); m_rwpipe.finish(); throw ex; } }
int main(int argc, const char **argv) { printf("Running all tests...\n\n"); //**** core tests testTree(); testParse(); testDef(); testWord(); testFlow(); testVM(); testStack(); testInit(); testCommand(); testConversation(); testScape(); // testThreads(); //**** builtins tests testNoun(); testPattern(); //testArray(); // testStream(); testInt(); testStr255(); testCfunc(); testReceptorUtil(); // testReceptor(); //testVmHost(); //**** examples test testPoint(); // testLine(); report_tests(); return 0; }