(t *testing.T)
| 186 | } |
| 187 | |
| 188 | func TestBoolean_InList(t *testing.T) { |
| 189 | t.Run("basic", func(t *testing.T) { |
| 190 | for _, data := range []bool{true, false} { |
| 191 | t.Run(fmt.Sprintf("%v", data), func(t *testing.T) { |
| 192 | reporter := newMockReporter(t) |
| 193 | |
| 194 | NewBoolean(reporter, data).InList(data). |
| 195 | chain.assert(t, success) |
| 196 | |
| 197 | NewBoolean(reporter, data).InList(!data, data). |
| 198 | chain.assert(t, success) |
| 199 | |
| 200 | NewBoolean(reporter, data).InList(!data, !data). |
| 201 | chain.assert(t, failure) |
| 202 | |
| 203 | NewBoolean(reporter, data).NotInList(data). |
| 204 | chain.assert(t, failure) |
| 205 | |
| 206 | NewBoolean(reporter, data).NotInList(!data, data). |
| 207 | chain.assert(t, failure) |
| 208 | |
| 209 | NewBoolean(reporter, data).NotInList(!data, !data). |
| 210 | chain.assert(t, success) |
| 211 | }) |
| 212 | } |
| 213 | }) |
| 214 | |
| 215 | t.Run("invalid argument", func(t *testing.T) { |
| 216 | for _, data := range []bool{true, false} { |
| 217 | reporter := newMockReporter(t) |
| 218 | |
| 219 | NewBoolean(reporter, data).InList(). |
| 220 | chain.assert(t, failure) |
| 221 | |
| 222 | NewBoolean(reporter, data).NotInList(). |
| 223 | chain.assert(t, failure) |
| 224 | } |
| 225 | }) |
| 226 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…