Skip to content

Commit e94cd98

Browse files
Sindhu1143Sivasindhura Mule
authored andcommitted
RIC-1113 Testcase for class trigger guard (#76)
* Added testcase for class trigger guard * Added testcase for class trigger guard * Addressed PR comments * Addressed PR comments * Added MRT model * Extended support in the testcase to test corner case * Addressed PR comments * Addressed PR comments --------- Co-authored-by: Sivasindhura Mule <sivasindhura.mule@prod.hclpnp.com>
1 parent 59fac1a commit e94cd98

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

art-comp-test/tests/class_trigger_guard/class_trigger_guard.art

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class MyClass {
1919
y = 1;
2020
ASSERT(b, "Value of b is not true");
2121
`;
22+
S2 -> S3 on foo(`bool`)
23+
`
24+
x = 0;
25+
y = 0;
26+
`;
2227
S1 -> S3 on foo(`bool`) [`x == 1`] when `y == 1`
2328
`
2429
x = 2;
@@ -46,6 +51,9 @@ capsule Top {
4651
p.foo(b);
4752
ASSERT(p.x == 1, "Unexpected value of x");
4853
ASSERT(p.y == 1, "Unexpected value of y");
54+
p.foo(false);
55+
ASSERT(p.x == 0, "Unexpected value of x");
56+
ASSERT(p.y == 0, "Unexpected value of y");
4957
PASS();
5058
`;
5159
};

0 commit comments

Comments
 (0)