added sequence tests
This commit is contained in:
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)
|
||||
})
|
Reference in New Issue
Block a user