diff --git a/tests/group/.gitignore b/tests/group/.gitignore new file mode 100644 index 0000000..40223be --- /dev/null +++ b/tests/group/.gitignore @@ -0,0 +1,4 @@ +# generated by tytanic, do not edit + +diff/** +out/** diff --git a/tests/group/ref/1.png b/tests/group/ref/1.png new file mode 100644 index 0000000..4c6b690 Binary files /dev/null and b/tests/group/ref/1.png differ diff --git a/tests/group/ref/2.png b/tests/group/ref/2.png new file mode 100644 index 0000000..6628385 Binary files /dev/null and b/tests/group/ref/2.png differ diff --git a/tests/group/ref/3.png b/tests/group/ref/3.png new file mode 100644 index 0000000..3c8b5bb Binary files /dev/null and b/tests/group/ref/3.png differ diff --git a/tests/group/test.typ b/tests/group/test.typ new file mode 100644 index 0000000..213df95 --- /dev/null +++ b/tests/group/test.typ @@ -0,0 +1,51 @@ +#set page(width: auto, height: auto) +#import "/src/lib.typ": * + +#diagram({ + _seq("Alice", "Bob", comment: "Authentication Request") + + _alt( + "successful case", { + _seq("Bob", "Alice", comment: "Authentication Accepted") + }, + "some kind of failure", { + _seq("Bob", "Alice", comment: "Authentication Failure") + + _grp("My own label", desc: "My own label2", { + _seq("Alice", "Log", comment: "Log attack start") + _loop("1000 times", { + _seq("Alice", "Bob", comment: "DNS Attack") + }) + _seq("Alice", "Log", comment: "Log attack end") + }) + }, + "Another type of failure", { + _seq("Bob", "Alice", comment: "Please repeat") + } + ) +}) + +#pagebreak() + +#diagram({ + _par("a", display-name: box(width: 1.5em, height: .5em), show-bottom: false) + _par("b", display-name: box(width: 1.5em, height: .5em), show-bottom: false) + _col("a", "b", width: 2cm) + _loop("a<1", min: 1, { + _seq("a", "b", end-tip: ">>") + _seq("b", "a", end-tip: ">>") + }) + _seq("a", "b", end-tip: ">>") +}) + +#pagebreak() + +#diagram({ + _par("A") + _par("B") + _col("A", "B", width: 3cm) + _seq("A", "B", enable-dst: true) + _alt([desc], { + _ret() + }) +}) \ No newline at end of file