Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Jan 24, 2024
1 parent d4bab05 commit 678c6bb
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,29 @@ private Model parseWithError(String s) throws Exception {
return model;
}

/** Assert no issues when multiple labels are used. */
@Test
public void multipleLabels() throws Exception {
String testCase =
"""
target C
reactor Source {
output out: int
timer t(1 nsec, 10 msec)
state s: int = 0
@label(value="Foo")
reaction(startup) {= lf_print("Starting Source"); =}
@label(value="Bar")
reaction(t) -> out {=
lf_set(out, self->s++);
lf_print("Inside source reaction_0");
=}
}""";
validator.assertNoIssues(parseWithoutError(testCase));
}

/** Ensure that duplicate identifiers for actions reported. */
@Test
public void tracingOptionsCpp() throws Exception {
Expand Down

0 comments on commit 678c6bb

Please sign in to comment.