Add tests #12
4
tests/sequence/comment-align/.gitignore
vendored
Normal file
4
tests/sequence/comment-align/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# generated by tytanic, do not edit
|
||||
|
||||
diff/**
|
||||
out/**
|
BIN
tests/sequence/comment-align/ref/1.png
Normal file
BIN
tests/sequence/comment-align/ref/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
BIN
tests/sequence/comment-align/ref/2.png
Normal file
BIN
tests/sequence/comment-align/ref/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
57
tests/sequence/comment-align/test.typ
Normal file
57
tests/sequence/comment-align/test.typ
Normal file
@ -0,0 +1,57 @@
|
||||
#set page(width: auto, height: auto)
|
||||
#import "/src/lib.typ": *
|
||||
|
||||
#diagram({
|
||||
_par("alice", display-name: "Alice")
|
||||
_par("bob", display-name: "Bob")
|
||||
_seq("alice", "bob", comment: "This is a very long comment")
|
||||
|
||||
// Left to right
|
||||
_seq("alice", "bob", comment: "Start aligned", comment-align: "start")
|
||||
_seq("alice", "bob", comment: "End aligned", comment-align: "end")
|
||||
_seq("alice", "bob", comment: "Left aligned", comment-align: "left")
|
||||
_seq("alice", "bob", comment: "Right aligned", comment-align: "right")
|
||||
_seq("alice", "bob", comment: "Centered", comment-align: "center")
|
||||
_gap()
|
||||
|
||||
// Right to left
|
||||
_seq("bob", "alice", comment: "Start aligned", comment-align: "start")
|
||||
_seq("bob", "alice", comment: "End aligned", comment-align: "end")
|
||||
_seq("bob", "alice", comment: "Left aligned", comment-align: "left")
|
||||
_seq("bob", "alice", comment: "Right aligned", comment-align: "right")
|
||||
_seq("bob", "alice", comment: "Centered", comment-align: "center")
|
||||
_gap()
|
||||
|
||||
// Slant left to right
|
||||
_seq("alice", "bob", comment: "Start aligned", comment-align: "start", slant: 10)
|
||||
_seq("alice", "bob", comment: "End aligned", comment-align: "end", slant: 10)
|
||||
_seq("alice", "bob", comment: "Left aligned", comment-align: "left", slant: 10)
|
||||
_seq("alice", "bob", comment: "Right aligned", comment-align: "right", slant: 10)
|
||||
_seq("alice", "bob", comment: "Centered", comment-align: "center", slant: 10)
|
||||
_gap()
|
||||
|
||||
// Slant right to left
|
||||
_seq("bob", "alice", comment: "Start aligned", comment-align: "start", slant: 10)
|
||||
_seq("bob", "alice", comment: "End aligned", comment-align: "end", slant: 10)
|
||||
_seq("bob", "alice", comment: "Left aligned", comment-align: "left", slant: 10)
|
||||
_seq("bob", "alice", comment: "Right aligned", comment-align: "right", slant: 10)
|
||||
_seq("bob", "alice", comment: "Centered", comment-align: "center", slant: 10)
|
||||
})
|
||||
|
||||
#pagebreak()
|
||||
|
||||
#diagram({
|
||||
_par("alice", display-name: "Alice")
|
||||
|
||||
_seq("alice", "alice", comment: "Start aligned", comment-align: "start")
|
||||
_seq("alice", "alice", comment: "End aligned", comment-align: "end")
|
||||
_seq("alice", "alice", comment: "Left aligned", comment-align: "left")
|
||||
_seq("alice", "alice", comment: "Right aligned", comment-align: "right")
|
||||
_seq("alice", "alice", comment: "Centered", comment-align: "center")
|
||||
|
||||
_seq("alice", "alice", comment: "Start aligned", comment-align: "start", flip: true)
|
||||
_seq("alice", "alice", comment: "End aligned", comment-align: "end", flip: true)
|
||||
_seq("alice", "alice", comment: "Left aligned", comment-align: "left", flip: true)
|
||||
_seq("alice", "alice", comment: "Right aligned", comment-align: "right", flip: true)
|
||||
_seq("alice", "alice", comment: "Centered", comment-align: "center", flip: true)
|
||||
})
|
4
tests/sequence/special-par/.gitignore
vendored
Normal file
4
tests/sequence/special-par/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# generated by tytanic, do not edit
|
||||
|
||||
diff/**
|
||||
out/**
|
BIN
tests/sequence/special-par/ref/1.png
Normal file
BIN
tests/sequence/special-par/ref/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
12
tests/sequence/special-par/test.typ
Normal file
12
tests/sequence/special-par/test.typ
Normal file
@ -0,0 +1,12 @@
|
||||
#set page(width: auto, height: auto)
|
||||
#import "/src/lib.typ": *
|
||||
|
||||
#diagram({
|
||||
_seq("?", "Alice", comment: [?->\ *short* to actor1])
|
||||
_seq("[", "Alice", comment: [\[->\ *from start* to actor1])
|
||||
_seq("[", "Bob", comment: [\[->\ *from start* to actor2])
|
||||
_seq("?", "Bob", comment: [?->\ *short* to actor2])
|
||||
_seq("Alice", "]", comment: [->\]\ from actor1 *to end*])
|
||||
_seq("Alice", "?", comment: [->?\ *short* from actor1])
|
||||
_seq("Alice", "Bob", comment: [->\ from actor1 to actor2])
|
||||
})
|
4
tests/sequence/tips/.gitignore
vendored
Normal file
4
tests/sequence/tips/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# generated by tytanic, do not edit
|
||||
|
||||
diff/**
|
||||
out/**
|
BIN
tests/sequence/tips/ref/1.png
Normal file
BIN
tests/sequence/tips/ref/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
tests/sequence/tips/ref/2.png
Normal file
BIN
tests/sequence/tips/ref/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
tests/sequence/tips/ref/3.png
Normal file
BIN
tests/sequence/tips/ref/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
84
tests/sequence/tips/test.typ
Normal file
84
tests/sequence/tips/test.typ
Normal file
@ -0,0 +1,84 @@
|
||||
#set page(width: auto, height: auto)
|
||||
#import "/src/lib.typ": *
|
||||
|
||||
#diagram({
|
||||
_par("a", display-name: "Alice")
|
||||
_par("b", display-name: "Bob")
|
||||
|
||||
_seq("a", "b", end-tip: ">", comment: `->`)
|
||||
_seq("a", "b", end-tip: ">>", comment: `->>`)
|
||||
_seq("a", "b", end-tip: "\\", comment: `-\`)
|
||||
_seq("a", "b", end-tip: "\\\\", comment: `-\\`)
|
||||
_seq("a", "b", end-tip: "/", comment: `-/`)
|
||||
_seq("a", "b", end-tip: "//", comment: `-//`)
|
||||
_seq("a", "b", end-tip: "x", comment: `->x`)
|
||||
_seq("a", "b", start-tip: "x", comment: `x->`)
|
||||
_seq("a", "b", start-tip: "o", comment: `o->`)
|
||||
_seq("a", "b", end-tip: ("o", ">"), comment: `->o`)
|
||||
_seq("a", "b", start-tip: "o", end-tip: ("o", ">"), comment: `o->o`)
|
||||
_seq("a", "b", start-tip: ">", end-tip: ">", comment: `<->`)
|
||||
_seq("a", "b", start-tip: ("o", ">"), end-tip: ("o", ">"), comment: `o<->o`)
|
||||
_seq("a", "b", start-tip: "x", end-tip: "x", comment: `x<->x`)
|
||||
_seq("a", "b", end-tip: ("o", ">>"), comment: `->>o`)
|
||||
_seq("a", "b", end-tip: ("o", "\\"), comment: `-\o`)
|
||||
_seq("a", "b", end-tip: ("o", "\\\\"), comment: `-\\o`)
|
||||
_seq("a", "b", end-tip: ("o", "/"), comment: `-/o`)
|
||||
_seq("a", "b", end-tip: ("o", "//"), comment: `-//o`)
|
||||
_seq("a", "b", start-tip: "x", end-tip: ("o", ">"), comment: `x->o`)
|
||||
})
|
||||
|
||||
#pagebreak()
|
||||
|
||||
#diagram({
|
||||
_par("a", display-name: "Alice")
|
||||
_par("b", display-name: "Bob")
|
||||
|
||||
_seq("b", "a", end-tip: ">", comment: `->`)
|
||||
_seq("b", "a", end-tip: ">>", comment: `->>`)
|
||||
_seq("b", "a", end-tip: "\\", comment: `-\`)
|
||||
_seq("b", "a", end-tip: "\\\\", comment: `-\\`)
|
||||
_seq("b", "a", end-tip: "/", comment: `-/`)
|
||||
_seq("b", "a", end-tip: "//", comment: `-//`)
|
||||
_seq("b", "a", end-tip: "x", comment: `->x`)
|
||||
_seq("b", "a", start-tip: "x", comment: `x->`)
|
||||
_seq("b", "a", start-tip: "o", comment: `o->`)
|
||||
_seq("b", "a", end-tip: ("o", ">"), comment: `->o`)
|
||||
_seq("b", "a", start-tip: "o", end-tip: ("o", ">"), comment: `o->o`)
|
||||
_seq("b", "a", start-tip: ">", end-tip: ">", comment: `<->`)
|
||||
_seq("b", "a", start-tip: ("o", ">"), end-tip: ("o", ">"), comment: `o<->o`)
|
||||
_seq("b", "a", start-tip: "x", end-tip: "x", comment: `x<->x`)
|
||||
_seq("b", "a", end-tip: ("o", ">>"), comment: `->>o`)
|
||||
_seq("b", "a", end-tip: ("o", "\\"), comment: `-\o`)
|
||||
_seq("b", "a", end-tip: ("o", "\\\\"), comment: `-\\o`)
|
||||
_seq("b", "a", end-tip: ("o", "/"), comment: `-/o`)
|
||||
_seq("b", "a", end-tip: ("o", "//"), comment: `-//o`)
|
||||
_seq("b", "a", start-tip: "x", end-tip: ("o", ">"), comment: `x->o`)
|
||||
})
|
||||
|
||||
#pagebreak()
|
||||
|
||||
#diagram({
|
||||
_par("a", display-name: "Alice")
|
||||
_par("b", display-name: "Bob")
|
||||
|
||||
_seq("a", "a", end-tip: ">", comment: `->`)
|
||||
_seq("a", "a", end-tip: ">>", comment: `->>`)
|
||||
_seq("a", "a", end-tip: "\\", comment: `-\`)
|
||||
_seq("a", "a", end-tip: "\\\\", comment: `-\\`)
|
||||
_seq("a", "a", end-tip: "/", comment: `-/`)
|
||||
_seq("a", "a", end-tip: "//", comment: `-//`)
|
||||
_seq("a", "a", end-tip: "x", comment: `->x`)
|
||||
_seq("a", "a", start-tip: "x", comment: `x->`)
|
||||
_seq("a", "a", start-tip: "o", comment: `o->`)
|
||||
_seq("a", "a", end-tip: ("o", ">"), comment: `->o`)
|
||||
_seq("a", "a", start-tip: "o", end-tip: ("o", ">"), comment: `o->o`)
|
||||
_seq("a", "a", start-tip: ">", end-tip: ">", comment: `<->`)
|
||||
_seq("a", "a", start-tip: ("o", ">"), end-tip: ("o", ">"), comment: `o<->o`)
|
||||
_seq("a", "a", start-tip: "x", end-tip: "x", comment: `x<->x`)
|
||||
_seq("a", "a", end-tip: ("o", ">>"), comment: `->>o`)
|
||||
_seq("a", "a", end-tip: ("o", "\\"), comment: `-\o`)
|
||||
_seq("a", "a", end-tip: ("o", "\\\\"), comment: `-\\o`)
|
||||
_seq("a", "a", end-tip: ("o", "/"), comment: `-/o`)
|
||||
_seq("a", "a", end-tip: ("o", "//"), comment: `-//o`)
|
||||
_seq("a", "a", start-tip: "x", end-tip: ("o", ">"), comment: `x->o`)
|
||||
})
|
Reference in New Issue
Block a user