(self)
| 104 | self.assertEqual(actual, expected) |
| 105 | |
| 106 | def _expected_loop(self): |
| 107 | total = 0 |
| 108 | total_large = 0 |
| 109 | total_small = 0 |
| 110 | total_tiny = 0 |
| 111 | for loop_iter in range(10): |
| 112 | outer = loop_iter * 10 |
| 113 | for inner_iter in range(loop_iter): |
| 114 | val = outer + inner_iter |
| 115 | if val >= 80: |
| 116 | total_large += val |
| 117 | elif val >= 50: |
| 118 | total_small += val |
| 119 | else: |
| 120 | total_tiny += val |
| 121 | total += val |
| 122 | return total, total_large, total_small, total_tiny |
| 123 | |
| 124 | def _actual_loop(self): |
| 125 | total = ops.Const(0) |