Skip to content

Commit

Permalink
Apply formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Nov 8, 2023
1 parent 898b08b commit 28816ae
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions test/Python/src/TagString.lf
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)
=}
}

0 comments on commit 28816ae

Please sign in to comment.