Commit 480f203b authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* refined constraint for guards in participating components, #165

parent d7943c65
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -643,10 +643,10 @@ context Block
  

  -- Guard for each participating tester in locally ordered test descriptions
  inv GuardsForParticipatingComponents ('If the \'Block\' is contained in a locally ordered \'TestDescription\' then a guard shall be specified for every participating \'ComponentInstance\' in the associated \'TestConfiguration\' that has the role \'Tester\' or there shall be no guards at all. ' + self.toString()):
  inv GuardsForParticipatingComponents ('If the \'Block\' is contained in a locally ordered \'TestDescription\' then exactly one guard shall be specified for every participating \'ComponentInstance\' in the associated \'TestConfiguration\' that has the role \'Tester\' or there shall be no guards at all. ' + self.toString()):
        self.guard->size() = 0
          or self.getParticipatingComponents()->reject(c | c.role = ComponentInstanceRole::SUT)
              ->forAll(c | self.guard->exists(ex | ex.componentInstance = c))
              ->forAll(c | self.guard->one(ex | ex.componentInstance = c))
          or not self.getParentTestDescription().isLocallyOrdered