Skip to content

Commit

Permalink
Apply formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Nov 5, 2023
1 parent 05ef99e commit 1c05030
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 1c05030

Please sign in to comment.