aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-09-06 11:14:12 -0700
committeralon@honor <none@none>2010-09-06 11:14:12 -0700
commit4cc594f20933435dee74046d2d10d61b1a19c5fa (patch)
tree397995ad40d7228ee55dc37fe7354c6a2d1ff3a5 /tests
parentfb18f94135ce2354ee3a225ffc2d73341139b6a8 (diff)
fix relooper bug with loops with just an inc block
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 42e8e7f1..eae225b4 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -341,11 +341,27 @@ class T(unittest.TestCase):
total += c->value;
c = c->next;
}
+
+ // Chunk of em
+ worker_args chunk[10];
+ for (int i = 0; i < 9; i++) {
+ chunk[i].value = i*10;
+ chunk[i].next = &chunk[i+1];
+ }
+ chunk[9].value = 90;
+ chunk[9].next = &chunk[0];
+
+ c = chunk;
+ do {
+ total += c->value;
+ c = c->next;
+ } while (c != chunk);
+
printf("*%d*\\n", total);
return 0;
}
'''
- self.do_test(src, '*960*')
+ self.do_test(src, '*1410*')
def test_class(self):
src = '''