MCPcopy Index your code
hub / github.com/box-cli-maker/box-cli-maker / TestRenderInvalidTitlePosition

Function TestRenderInvalidTitlePosition

box_render_test.go:292–301  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

290}
291
292func TestRenderInvalidTitlePosition(t *testing.T) {
293 b := NewBox().Padding(2, 1).Style(Single).TitlePosition(TitlePosition("Weird"))
294 _, err := b.Render("Title", "Content")
295 if err == nil {
296 t.Fatalf("expected error for invalid TitlePosition, got nil")
297 }
298 if !strings.Contains(err.Error(), "invalid TitlePosition") {
299 t.Errorf("unexpected error message: %v", err)
300 }
301}
302
303func TestRenderMultilineTitleNonInside(t *testing.T) {
304 b := NewBox().Padding(2, 1).Style(Single).TitlePosition(Top)

Callers

nothing calls this directly

Calls 6

NewBoxFunction · 0.85
TitlePositionTypeAlias · 0.85
TitlePositionMethod · 0.80
StyleMethod · 0.80
PaddingMethod · 0.80
RenderMethod · 0.80

Tested by

no test coverage detected