[pypy-svn] r65105 - pypy/trunk/pypy/rpython/test
jandem at codespeak.net
jandem at codespeak.net
Wed May 6 16:53:38 CEST 2009
Author: jandem
Date: Wed May 6 16:53:38 2009
New Revision: 65105
Modified:
pypy/trunk/pypy/rpython/test/test_rstr.py
Log:
add tests for commit 65097
Modified: pypy/trunk/pypy/rpython/test/test_rstr.py
==============================================================================
--- pypy/trunk/pypy/rpython/test/test_rstr.py (original)
+++ pypy/trunk/pypy/rpython/test/test_rstr.py Wed May 6 16:53:38 2009
@@ -271,6 +271,17 @@
res = self.interpret(fn, [i, j])
assert res == fn(i, j)
+ def test_find_TyperError(self):
+ const = self.const
+ def f():
+ s = const('abc')
+ s.find(s, 0, -10)
+ raises(TyperError, self.interpret, f, ())
+ def f():
+ s = const('abc')
+ s.find(s, -10)
+ raises(TyperError, self.interpret, f, ())
+
def test_find_empty_string(self):
const = self.const
def f(i):
@@ -715,6 +726,17 @@
res = self.interpret(fn, [])
assert res == 1
+ def test_count_TyperError(self):
+ const = self.const
+ def f():
+ s = const('abc')
+ s.count(s, 0, -10)
+ raises(TyperError, self.interpret, f, ())
+ def f():
+ s = const('abc')
+ s.count(s, -10)
+ raises(TyperError, self.interpret, f, ())
+
def test_getitem_exc(self):
const = self.const
def f(x):
More information about the Pypy-commit
mailing list