Author: Armin Rigo <[email protected]>
Branch: array-overallocation-in-nursery
Changeset: r67500:ba49d53368d9
Date: 2013-10-22 12:09 +0200
http://bitbucket.org/pypy/pypy/changeset/ba49d53368d9/

Log:    Another passing test

diff --git a/rpython/rtyper/test/test_llann.py 
b/rpython/rtyper/test/test_llann.py
--- a/rpython/rtyper/test/test_llann.py
+++ b/rpython/rtyper/test/test_llann.py
@@ -532,3 +532,13 @@
     assert f() == 1005
     res = interpret(f, [])
     assert res == 1005
+
+def test_check_used_length_not_too_big():
+    A = GcArray(Signed, hints={'overallocated': True})
+
+    def f(n):
+        a = malloc(A, n)
+        a.used_length = 10
+
+    py.test.raises(ValueError, f, 5)
+    py.test.raises(ValueError, interpret, f, [5])
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to