(t *testing.T)
| 101 | } |
| 102 | |
| 103 | func TestFormat(t *testing.T) { |
| 104 | tt := testutils.T{t} |
| 105 | |
| 106 | const woo = `woo` |
| 107 | const waawoo = `waa: woo` |
| 108 | testCases := []struct { |
| 109 | name string |
| 110 | err error |
| 111 | expFmtSimple string |
| 112 | expFmtVerbose string |
| 113 | }{ |
| 114 | {"handled", barriers.Handled(goErr.New("woo")), woo, ` |
| 115 | woo |
| 116 | (1) woo |
| 117 | | -- cause hidden behind barrier |
| 118 | | woo |
| 119 | | (1) woo |
| 120 | | Error types: (1) *errors.errorString |
| 121 | Error types: (1) *barriers.barrierErr`}, |
| 122 | |
| 123 | {"handled + handled", barriers.Handled(barriers.Handled(goErr.New("woo"))), woo, ` |
| 124 | woo |
| 125 | (1) woo |
| 126 | | -- cause hidden behind barrier |
| 127 | | woo |
| 128 | | (1) woo |
| 129 | | | -- cause hidden behind barrier |
| 130 | | | woo |
| 131 | | | (1) woo |
| 132 | | | Error types: (1) *errors.errorString |
| 133 | | Error types: (1) *barriers.barrierErr |
| 134 | Error types: (1) *barriers.barrierErr`}, |
| 135 | |
| 136 | {"handledmsg", barriers.HandledWithMessage(goErr.New("woo"), "waa"), "waa", ` |
| 137 | waa |
| 138 | (1) waa |
| 139 | | -- cause hidden behind barrier |
| 140 | | woo |
| 141 | | (1) woo |
| 142 | | Error types: (1) *errors.errorString |
| 143 | Error types: (1) *barriers.barrierErr`}, |
| 144 | |
| 145 | {"handledmsg + handledmsg", barriers.HandledWithMessage( |
| 146 | barriers.HandledWithMessage( |
| 147 | goErr.New("woo"), "waa"), "wuu"), `wuu`, ` |
| 148 | wuu |
| 149 | (1) wuu |
| 150 | | -- cause hidden behind barrier |
| 151 | | waa |
| 152 | | (1) waa |
| 153 | | | -- cause hidden behind barrier |
| 154 | | | woo |
| 155 | | | (1) woo |
| 156 | | | Error types: (1) *errors.errorString |
| 157 | | Error types: (1) *barriers.barrierErr |
| 158 | Error types: (1) *barriers.barrierErr`}, |
| 159 | |
| 160 | {"handled + wrapper", |
nothing calls this directly
no test coverage detected
searching dependent graphs…