-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from audrey-jardin/main
New unit tests to better define the difference from "time" and "time from" built-in operators
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
src/test/resources/testModels/spec-doc-examples/EventElapsedPhysicalTime_no_ext.crml
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,5 @@ | ||
model EventElapsedPhysicalTime_no_ext is { | ||
Boolean b is if 2.5 < time and time < 5 then true else false; | ||
Event e is new Event b; | ||
Real d_elapsed_physical_time is time from e; // Value should start at 0 and then increase from t=2.5s to be equal to time-2.5. | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/test/resources/testModels/spec-doc-examples/EventElapsed_no_ext.crml
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,7 @@ | ||
model EventElapsed_no_ext is { | ||
Boolean b1 is if (2.0 <= time and time < 3.5) or (4.0 <= time and time < 5.5) then true else false; | ||
Boolean b2 is if 2.5 < time and time < 5 then true else false; | ||
Event e1 is new Event b1; | ||
Event e2 is new Event b2; | ||
Real d_elapsed is e2 - e1; // Value should start at 0 and then equal to 0.5 from t=2.5s. | ||
}; |