use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.
the class LiftsTest method testOpenDoorWhileMoving.
@Test
public void testOpenDoorWhileMoving() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "OpenDoorWhileMoving.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
assertEquals("{doors_open=true, moving=true}", result.getLastState().toString());
}
use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.
the class LiftsTest method testSlowDoors.
@Test
public void testSlowDoors() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "SlowDoors.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
}
use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.
the class LiftsTest method testLowerHigher.
@Test
public void testLowerHigher() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "LiftLowerHigher.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
assertEquals("{doors_open=false, moving=true, current_floor=-1}", result.getLastState().toString());
}
use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.
the class ModelCheckerMachineFilesTest method testSimpleModelWithoutVariables.
@Test
public void testSimpleModelWithoutVariables() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "OnlyConstants.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(true, result.isCorrect());
}
use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.
the class ModelCheckerMachineFilesTest method testSimpleModelsWithoutOperations.
@Test
public void testSimpleModelsWithoutOperations() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "OnlyInitViolation.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
assertEquals(1, result.getSteps());
MachineNode simpleMachineWithoutViolation = parseMachineFromFile(dir + "OnlyInitNoViolation.mch");
result = ExplicitStateModelChecker.check(simpleMachineWithoutViolation);
assertEquals(true, result.isCorrect());
assertEquals(1, result.getSteps());
}
Aggregations