-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
29 deletions.
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
// Tests the get_microstep() function in the python target. | ||
# Tests the get_microstep() function in the python target. | ||
target Python { | ||
fast: false | ||
}; | ||
fast: false | ||
} | ||
|
||
main reactor TagString { | ||
preamble {= | ||
import sys | ||
=} | ||
state s(1); | ||
preamble {= | ||
import sys | ||
=} | ||
state s = 1 | ||
|
||
// timer t(0, 1 msec); | ||
logical action l; | ||
reaction(startup) -> l {= | ||
l.schedule(0); | ||
=} | ||
logical action l # timer t(0, 1 msec); | ||
|
||
reaction(l) -> l {= | ||
tag_str = str(lf.tag()) | ||
|
||
if "Tag" in tag_str and \ | ||
"time=" in tag_str and \ | ||
"microstep=" in tag_str: | ||
print("Successful tag string representation:", tag_str) | ||
else: | ||
self.sys.stderr.write( | ||
f"expected tag string representation: " \ | ||
"Tag(time=$time, microstep=$microstep), instead got: {}\n".format(tag_str)) | ||
self.sys.exit(1) | ||
reaction(startup) -> l {= | ||
l.schedule(0); | ||
=} | ||
|
||
self.s += 1 | ||
if self.s < 10: | ||
l.schedule(0) | ||
=} | ||
} | ||
reaction(l) -> l {= | ||
tag_str = str(lf.tag()) | ||
|
||
if "Tag" in tag_str and \ | ||
"time=" in tag_str and \ | ||
"microstep=" in tag_str: | ||
print("Successful tag string representation:", tag_str) | ||
else: | ||
self.sys.stderr.write( | ||
f"expected tag string representation: " \ | ||
"Tag(time=$time, microstep=$microstep), instead got: {}\n".format(tag_str)) | ||
self.sys.exit(1) | ||
|
||
self.s += 1 | ||
if self.s < 10: | ||
l.schedule(0) | ||
=} | ||
} |