@@ -79,6 +79,38 @@ func TestSerializeSequenceFlow_Mx10_UsesModernShape(t *testing.T) {
7979 }
8080}
8181
82+ func TestSerializeEndEvent_EmptyReturnValueHasNoTrailingLineBreak (t * testing.T ) {
83+ end := & microflows.EndEvent {
84+ BaseMicroflowObject : microflows.BaseMicroflowObject {
85+ BaseElement : model.BaseElement {ID : "end-empty" },
86+ Position : model.Point {X : 10 , Y : 20 },
87+ Size : model.Size {Width : 20 , Height : 20 },
88+ },
89+ ReturnValue : "empty" ,
90+ }
91+
92+ doc := serializeMicroflowObject (end )
93+ if got := bsonGetKey (doc , "ReturnValue" ); got != "empty" {
94+ t .Fatalf ("ReturnValue = %q, want %q" , got , "empty" )
95+ }
96+ }
97+
98+ func TestSerializeEndEvent_NonEmptyReturnValueHasNoSyntheticLineBreak (t * testing.T ) {
99+ end := & microflows.EndEvent {
100+ BaseMicroflowObject : microflows.BaseMicroflowObject {
101+ BaseElement : model.BaseElement {ID : "end-result" },
102+ Position : model.Point {X : 10 , Y : 20 },
103+ Size : model.Size {Width : 20 , Height : 20 },
104+ },
105+ ReturnValue : "$Result" ,
106+ }
107+
108+ doc := serializeMicroflowObject (end )
109+ if got := bsonGetKey (doc , "ReturnValue" ); got != "$Result" {
110+ t .Fatalf ("ReturnValue = %q, want %q" , got , "$Result" )
111+ }
112+ }
113+
82114func TestSerializeAnnotationFlow_VersionShapes (t * testing.T ) {
83115 af := & microflows.AnnotationFlow {
84116 BaseElement : model.BaseElement {ID : "af-1" },
0 commit comments