Skip to content

Commit

Permalink
added new branch for issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusRost committed Oct 7, 2023
1 parent 0638438 commit e90abf6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ dmypy.json
.vscode/

# This might be weird, but I think this is where the conf.py should be
tutorial/conf.py
tutorial/conf.py
test.mmd
16 changes: 15 additions & 1 deletion tests/test_end_constraints.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from test_utils import init_test_setup_for_compiler
from test_utils import init_test_setup_for_compiler, init_test_setup_for_parser
from file_constants import (
MULTIPLE_ENDINGS_DIAGRAM,
LINEAR_SEQUENCE_DIAGRAM_WITHOUT_START_AND_END,
XOR_GATEWAY_SEQUENCE_DIAGRAM
)


Expand All @@ -18,3 +19,16 @@ def test_end_constraint_is_generated_when_multiple_endings():
def test_end_constraint_is_generated_without_explicit_end_event():
res = init_test_setup_for_compiler(LINEAR_SEQUENCE_DIAGRAM_WITHOUT_START_AND_END)
assert "End[second element]" in res

def test_end_constraint_is_generated_when_multiple_endings():
res = init_test_setup_for_parser(MULTIPLE_ENDINGS_DIAGRAM)
expected_ending_constraints = [
"End[activity four]",
"End[action five]",
]
assert all(constraint in res for constraint in expected_ending_constraints)

def test_end_constraint_is_generated_when_xor_gateway():
res = init_test_setup_for_compiler(XOR_GATEWAY_SEQUENCE_DIAGRAM)
assert "End[second element]" in res
assert "End[third element]" in res

0 comments on commit e90abf6

Please sign in to comment.