2022-11-28 02:21:50PM

This commit is contained in:
Alexander Wang 2022-11-28 14:21:50 -08:00
parent 1796dd9020
commit 3e6b3490bc
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
2 changed files with 52 additions and 52 deletions

View file

@ -1505,20 +1505,20 @@ dst.id <-> src.dst_id
name: "basic_sequence", name: "basic_sequence",
text: `x: { text: `x: {
shape: sequence shape: sequence_diagram
} }
`, `,
assertions: func(t *testing.T, g *d2graph.Graph) { assertions: func(t *testing.T, g *d2graph.Graph) {
diff.AssertStringEq(t, "sequence", g.Objects[0].Attributes.Shape.Value) diff.AssertStringEq(t, "sequence_diagram", g.Objects[0].Attributes.Shape.Value)
}, },
}, },
{ {
name: "root_sequence", name: "root_sequence",
text: `shape: sequence text: `shape: sequence_diagram
`, `,
assertions: func(t *testing.T, g *d2graph.Graph) { assertions: func(t *testing.T, g *d2graph.Graph) {
diff.AssertStringEq(t, "sequence", g.Root.Attributes.Shape.Value) diff.AssertStringEq(t, "sequence_diagram", g.Root.Attributes.Shape.Value)
}, },
}, },
} }

View file

@ -277,7 +277,7 @@ const (
ShapeClass = "class" ShapeClass = "class"
ShapeSQLTable = "sql_table" ShapeSQLTable = "sql_table"
ShapeImage = "image" ShapeImage = "image"
ShapeSequence = "sequence" ShapeSequenceDiagram = "sequence_diagram"
) )
var Shapes = []string{ var Shapes = []string{
@ -303,7 +303,7 @@ var Shapes = []string{
ShapeClass, ShapeClass,
ShapeSQLTable, ShapeSQLTable,
ShapeImage, ShapeImage,
ShapeSequence, ShapeSequenceDiagram,
} }
func IsShape(s string) bool { func IsShape(s string) bool {
@ -370,7 +370,7 @@ var DSL_SHAPE_TO_SHAPE_TYPE = map[string]string{
ShapeClass: shape.CLASS_TYPE, ShapeClass: shape.CLASS_TYPE,
ShapeSQLTable: shape.TABLE_TYPE, ShapeSQLTable: shape.TABLE_TYPE,
ShapeImage: shape.IMAGE_TYPE, ShapeImage: shape.IMAGE_TYPE,
ShapeSequence: shape.SQUARE_TYPE, ShapeSequenceDiagram: shape.SQUARE_TYPE,
} }
var SHAPE_TYPE_TO_DSL_SHAPE map[string]string var SHAPE_TYPE_TO_DSL_SHAPE map[string]string