Debian Codegraph @

rpython/jit/backend/x86/test/test_tlc.py

raw symbols SCIP
1
2 import py
3 from rpython.jit.backend.x86.test.test_basic import Jit386Mixin
4 from rpython.jit.metainterp.test.test_tlc import TLCTests
5 from rpython.jit.tl import tlc
6
7 class TestTL(Jit386Mixin, TLCTests):
8 # for the individual tests see
9 # ====> ../../test/test_tlc.py
10
11 def test_accumulator(self):
12 py.test.skip("investigate, maybe")
13 path = py.path.local(tlc.__file__).dirpath('accumulator.tlc.src')
14 code = path.read()
15 res = self.exec_code(code, 20)
16 assert res == sum(range(20))
17 res = self.exec_code(code, -10)
18 assert res == 10
19
20 def test_fib(self):
21 py.test.skip("investigate, maybe")
22 path = py.path.local(tlc.__file__).dirpath('fibo.tlc.src')
23 code = path.read()
24 res = self.exec_code(code, 7)
25 assert res == 13
26 res = self.exec_code(code, 20)
27 assert res == 6765