Skip to content

Commit

Permalink
print direction
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Sep 9, 2022
1 parent ccffe9c commit 74666d9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,15 @@ MeWritterVisitorFlowchartTest >> testWriteFlowchartDiagram [
flowchartDiagram accept: writter ].
self assert: result equals: 'flowchart'
]

{ #category : #initialization }
MeWritterVisitorFlowchartTest >> testWriteFlowchartDiagramWithDirection [

| flowchartDiagram result |
flowchartDiagram := MeFlowchartDiagram new.
flowchartDiagram direction: MeFCDirection TB.
result := String streamContents: [ :stream |
writter outputStream: stream.
flowchartDiagram accept: writter ].
self assert: result equals: 'flowchart TB'
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ Class {

{ #category : #visiting }
MeWritterVisitorFlowchart >> visitFlowchartDiagram: aFlowchartDiagram [
self <<< 'flowchart'

self <<< 'flowchart'.
aFlowchartDiagram direction ifNotNil: [ :direction |
self
<<< ' ';
<<< direction directionIdentifier ]
]

0 comments on commit 74666d9

Please sign in to comment.