(self, cond_net, expect, cond_on_blob)
| 154 | self.DoUntilLoopTest([self.idle_net_, step]) |
| 155 | |
| 156 | def IfCondTest(self, cond_net, expect, cond_on_blob): |
| 157 | if cond_on_blob: |
| 158 | step = control.Do( |
| 159 | 'if-all', |
| 160 | control.Do('count', cond_net), |
| 161 | control.If('myIf', cond_net.Proto().external_output[-1], |
| 162 | self.cnt_net_)) |
| 163 | else: |
| 164 | step = control.If('myIf', cond_net, self.cnt_net_) |
| 165 | self.BuildAndRunPlan(step) |
| 166 | self.CheckNetOutput([(self.cnt_net_, expect)]) |
| 167 | |
| 168 | def testIfCondTrueOnNet(self): |
| 169 | self.IfCondTest(self.true_cond_net_, 1, False) |
no test coverage detected