MCPcopy Create free account
hub / github.com/openclaw/gogcli / TestSlidesElementTransformRotation

Function TestSlidesElementTransformRotation

internal/cmd/slides_element_test.go:90–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestSlidesElementTransformRotation(t *testing.T) {
91 request := captureSlidesElementRequest(t, &SlidesElementTransformCmd{
92 PresentationID: "pres1",
93 ObjectID: "shape1",
94 Rotate: float64ElementTestPtr(90),
95 TranslateX: float64ElementTestPtr(10),
96 Unit: "PT",
97 ApplyMode: "RELATIVE",
98 }, &RootFlags{Account: "a@b.com"})
99
100 update := request.UpdatePageElementTransform
101 if update == nil || update.ObjectId != "shape1" || update.ApplyMode != "RELATIVE" {
102 t.Fatalf("unexpected transform update: %+v", update)
103 }
104 if math.Abs(update.Transform.ScaleX) > 1e-9 || math.Abs(update.Transform.ScaleY) > 1e-9 || update.Transform.ShearX != -1 || update.Transform.ShearY != 1 {
105 t.Fatalf("unexpected rotation matrix: %+v", update.Transform)
106 }
107 if update.Transform.TranslateX != 10 || update.Transform.TranslateY != 0 {
108 t.Fatalf("unexpected translation: %+v", update.Transform)
109 }
110}
111
112func TestSlidesElementStyleShape(t *testing.T) {
113 dash := "DASH"

Callers

nothing calls this directly

Calls 2

float64ElementTestPtrFunction · 0.85

Tested by

no test coverage detected