testSprintContains can be used to test Sprint methods.
(t *testing.T, logic func(a any) string)
| 103 | |
| 104 | // testSprintContains can be used to test Sprint methods. |
| 105 | func testSprintContains(t *testing.T, logic func(a any) string) { |
| 106 | for _, printable := range printables { |
| 107 | t.Run(fmt.Sprint(printable), func(t *testing.T) { |
| 108 | testza.AssertContains(t, logic(printable), fmt.Sprint(printable)) |
| 109 | }) |
| 110 | pterm.DisableStyling() |
| 111 | t.Run(fmt.Sprint(printable), func(t *testing.T) { |
| 112 | testza.AssertContains(t, logic(printable), fmt.Sprint(printable)) |
| 113 | }) |
| 114 | pterm.EnableStyling() |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // testSprintContainsWithoutError can be used to test Sprint methods which return an error. |
| 119 | func testSprintContainsWithoutError(t *testing.T, logic func(a any) (string, error)) { |
no test coverage detected
searching dependent graphs…