[VPU][Tests] Fix sanitizer issue in unit tests (#630)
authorAndrew Bakalin <andrew.bakalin@intel.com>
Thu, 28 May 2020 15:01:56 +0000 (18:01 +0300)
committerGitHub <noreply@github.com>
Thu, 28 May 2020 15:01:56 +0000 (18:01 +0300)
inference-engine/tests/unit/vpu/base/graph_transformer_tests.cpp

index 80a3f6f..2128342 100644 (file)
@@ -243,6 +243,10 @@ bool checkExecutionOrder(const Model& model, const std::vector<int>& execOrder)
     auto it = execOrder.begin();
 
     for (const auto& stage : model->getStages()) {
+        if (it == execOrder.end()) {
+            return true;
+        }
+
         if (stage->id() == *it) {
             ++it;
         }