(self, cond_net, expect, cond_on_blob)
| 207 | self.IfElseCondTest(self.false_cond_net_, False, 2, True) |
| 208 | |
| 209 | def IfNotCondTest(self, cond_net, expect, cond_on_blob): |
| 210 | if cond_on_blob: |
| 211 | step = control.Do( |
| 212 | 'if-not', |
| 213 | control.Do('count', cond_net), |
| 214 | control.IfNot('myIfNot', cond_net.Proto().external_output[-1], |
| 215 | self.cnt_net_)) |
| 216 | else: |
| 217 | step = control.IfNot('myIfNot', cond_net, self.cnt_net_) |
| 218 | self.BuildAndRunPlan(step) |
| 219 | self.CheckNetOutput([(self.cnt_net_, expect)]) |
| 220 | |
| 221 | def testIfNotCondTrueOnNet(self): |
| 222 | self.IfNotCondTest(self.true_cond_net_, 0, False) |
no test coverage detected