added group tests
This commit is contained in:
4
tests/group/.gitignore
vendored
Normal file
4
tests/group/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# generated by tytanic, do not edit
|
||||
|
||||
diff/**
|
||||
out/**
|
BIN
tests/group/ref/1.png
Normal file
BIN
tests/group/ref/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
BIN
tests/group/ref/2.png
Normal file
BIN
tests/group/ref/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
tests/group/ref/3.png
Normal file
BIN
tests/group/ref/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
51
tests/group/test.typ
Normal file
51
tests/group/test.typ
Normal file
@ -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()
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user