-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New integration test for shared variables
- Loading branch information
Arian Weber
authored and
Arian Weber
committed
Jan 26, 2024
1 parent
b881e1d
commit 00e4e4c
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
model :TestAction do | ||
|
||
graph :Car do | ||
var distance_to_wall: (0..10), init: 0 | ||
|
||
states :DrivingRelentlessly | ||
|
||
transition :DrivingRelentlessly => :DrivingRelentlessly do | ||
precon "distance_to_wall > 0" | ||
action "distance_to_wall := distance_to_wall - 1" | ||
end | ||
end | ||
graph :CrashDetector do | ||
states :no_crash, :crash, init: :no_crash | ||
|
||
transition :no_crash => :crash do | ||
guard "distance_to_wall == 0" | ||
end | ||
|
||
end | ||
|
||
specify "The car" do | ||
it "starts out driving" => :"CrashDetector == no_crash && Car == DrivingRelentlessly" | ||
it "crashes horribly" => :"F CrashDetector == crash" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters